hybridfree/eevblog-posts huggingface dataset:
SPC5 compiler - Page 1
Forum section: electronics / general

author: ali_asadzadeh
author_rank: Super Contributor
timestamp: September 24, 2020, 04:39:03 pm
content: HiI have a new project with SPC5 devices from ST, I have downloaded their SPC5 studio tool, it needs a license and it would refer to this linkhttps://register.hightec-rt.com/st/spc5x/But I think the page is broken and it would not even submitDo you have any Idea how to get a license ? or do you recommend any Other tool or compiler, I prefer free tools.

author: lucazader
author_rank: Regular Contributor
timestamp: September 26, 2020, 12:29:01 am
content: So the SPC5 ide is free to use, but the HighTec EDV-System compiler you have selected is not, and requires a licence.However the ST website says that there is a free GCC cased toolchain provided, so perhaps using GCC might be the best way forward

author: JPortici
author_rank: Super Contributor
timestamp: September 26, 2020, 04:27:31 am
content: they do say "Free License GCC GNU C Compiler component provided throught market place"mm..let me try later from my windows PC. Unfortunately it seems that they give you a paid compiler for free and the license is tied to your MAC address so in case it works i can't just send you the installerfound thishttps://community.st.com/s/question/0D50X00009sTm6FSAS/questions-about-spc5-studio-install-and-eco-system-for-spc58-devices

author: ali_asadzadeh
author_rank: Super Contributor
timestamp: September 26, 2020, 06:16:35 am
content: Thanks, It seems they are trying to play with us

author: JPortici
author_rank: Super Contributor
timestamp: September 26, 2020, 08:32:39 am
content: Hmm... the link in your first post worked fine here. Using firefox 81, ublock et cetera enabled

author: ali_asadzadeh
author_rank: Super Contributor
timestamp: September 26, 2020, 02:24:12 pm
content: QuoteWorks fine here too, I think they might have updated it.
Second project of TTGO Tdisplay ESP32 - remoting controls and screen - Page 1
Forum section: electronics / general

author: jcrubin
author_rank: Frequent Contributor
timestamp: September 19, 2020, 01:04:03 pm
content: Continuing from our first project with the TTGO-Tdisplay we expand upon the functionality of our project which measures temperature and humidity, but only physically at the device. In this video We will add on wireless network functionality, a webserver, Javascript and associated support code to facilitate this that it might be viewed from a web browser on a computer or smart phone.This example will use hardcoded wifi/ssid and password for simplification, using small steps to slowly write in support, this provides a better demonstration than simply showing a finished program and talking it through.The first goal is simply a bare bones webserver that can be hit on the network that does little but display connection success. Reading the IP info off of the terminal output to accomplish this. The first improvment is how we will be storing HTML going forward, in one concise location, this is followed by MDns support so we can use a name for the device instead of an IP.After this, I thought it a good Idea to leverage the display to show the network information when the device boots up so the user knows how to connect to it. Once the device connects to the network, the network info will display for five seconds and then jump to the normal programme.At this point some global variables are created so that we can start working on passing values to the web page. A simple workup is made for the four values in simple DIV containers. Following this, some simple Javascript is used to , at an interval request this data asynchronously, and populate those containers on receive. It is then required on the back end to supply the data for those requests. A small function that builds a JSON string and pushes it is assembled.This point in the project demonstrates a shortcoming of the webserver that comes with arduino IDE, and once demonstrated we segway to the installation of the asyncwebserver for esp32 as a replacement, then making the minor changes to accommodate it. Also I took the opportunity to remove the buttons from the interrupts due to a known hardware issue with the TTGO.Now the web page is bolstered with a F/C radio button and some computation to allow for conversion. The conversion which could have been done on the esp, was moved to the browser as an exercise.Finally to finish off we add CSS to make everything pretty.Code posted at:https://technocoma.blogspot.com/p/dht22-test-program-for-ttgo-t-display.html
UC1601S T151/T154a display controller replacement for SG–642 sine generator - Page 1
Forum section: electronics / general

author: Chris56000
author_rank: Frequent Contributor
timestamp: September 19, 2020, 10:17:29 am
content: Hi!In this thread here:–https://www.eevblog.com/forum/projects/tic154a-rdx0154gc-etc-132-x-64-fstn-lcd-uc1601s-controller-sources/. . .I asked about replacing the obsolete T151 module Member Liv used in his projects, so after looking around on eBay, Ali, Banggood, etc., I decided on one of these parallel 12864 modules plusan I²C adapter PCB to save having to redesign the front PCB:–Display:–https://www.ebay.co.uk/itm/264826350944I²C Adaptor:–https://www.ebay.co.uk/itm/223166505910Can anyone summarise the steps I need to carry out to replace the UC1601S code in Liv's SG–642 firmware with code to drive the replacement display's ST7920 please?What compiler do I require – there are "c" and "h" files in Liv's Code?Liv used two ATMega microcontrollers, one × 'Mega88 and 1 × 'Mega324.Are the U8G8 libraries suitable for this project?My apologies for asking what might be simple daft questions, but my skills are on circuit design and repair, rather than firmware, and all my essays in firmware have all ended in unfathomable error messages, or LCD modules that remain obstinately blank or all black blocks!!Chris Williams
STM32H7 FDCAN FD_MODE pin - Page 1
Forum section: electronics / general

author: Siwastaja
author_rank: Super Contributor
timestamp: September 17, 2020, 05:10:00 pm
content: A quick and possibly stupid question regarding STM32H750.What the heck are the alternative function pins:FDCAN1_RXFD_MODEFDCAN1_TXFD_MODEFDCAN2_RXFD_MODEFDCAN2_TXFD_MODESkimming through the FDCAN description in the reference manual, or using text search for "FD_MODE" reveal absolutely nothing. Reference manual lists all inputs and outputs of the FDCAN module, including internal-to-chip signals; no hit.What is this thing and where's the documentation for it?

author: mikerj
author_rank: Super Contributor
timestamp: September 17, 2020, 05:50:49 pm
content: Debug pins apparently:https://community.st.com/s/question/0D50X00009XkgJx/stm32h743-what-is-the-purpose-of-pins-fdcanntxfdrxfdSounds like they wanted to remove them from the documentation to avoid questions, but never actually did it.https://community.st.com/s/question/0D50X0000C5Uo6iSQC/rxfdmode-and-txfdmode-pins-what-are-they-for

author: Sal Ammoniac
author_rank: Super Contributor
timestamp: September 17, 2020, 06:01:58 pm
content: This is typical of ST documentation. Lots of stuff that's absolutely necessary to implement peripheral drivers is missing, yet lots of extraneous nonsense like these CAN-FD mode pins is left in when it should have been deleted.The ST documentation for CAN-FD in the STM32H7 reference manuals is almost a word-for-word copy of the Bosch documentation from here:https://www.bosch-semiconductors.com/media/ip_modules/pdf_2/m_can/mcan_users_manual_v330.pdf

author: Siwastaja
author_rank: Super Contributor
timestamp: September 18, 2020, 08:47:38 am
content: LOL, typical ST. No other manufacturer have any problem marking production test pins or debug pins as "TEST", "DBG", or something similar, and adding a footnote what they are.Thanks.
Omnivision - setting up the PLLs, clocks, registers - Page 1
Forum section: electronics / general

author: broncobilli
author_rank: Newbie
timestamp: September 14, 2020, 02:50:25 am
content: Ungh. I am at my wit's end... I've been handed a project started by another, with an OV4689 chip on it, and custom hardware, and I need to figure out why the firmware is wrong.I'm trying to understand why the registers on both the OV chip, and the Cypress CX3 chip are set up close, but not exact, and the camera freezes up once in a while. Frequently. I'm sure this is mainly a CX3 DMA issue w/ the way it was set up, but when I went in to review the OV chip settings, I was perplexed. Let's say stupefied. Can't figure out what the clocks on the OV4689 do, and why there are so many of them, and how they work.SCLKMIPI_PCLKMIPI_PHYSDAC_CLKPCLK periodPlus, I am fiddling with the registers, and can't figure out why the WIN_X_OFFSET and WIN_Y_OFFSET need to be non-zero. They describe some kind of windowing function on the sensor, and if I set them to zero, the sensor won't give me images any longer. Does ARRAY_X_START/END and ARRAY_Y_START/END have to contain a width/height that is slightly bigger than the image size that I want to transfer? Is this "just a thing"?Anybody else out there document this stuff, or is a guru on it and will answer a few questions?thanks!
SAMD51 Can use tc interrupt AND wavegen at the same time on same timer ? - Page 1
Forum section: electronics / general

author: snarkysparky
author_rank: Frequent Contributor
timestamp: September 13, 2020, 06:29:06 pm
content: It appears not possible to me.This stops outputting a toggle if both MPWM wavegen is enabled and the CC0 interrupt is enabled. Either by itself the timer keeps going.What I want to do is output a pulse train to a stepper motor without any jitter caused by interrupts through a wavegen output. Then count theminside the interrupt when it fires to keep count. The count can be jittery and even one or two off in error. Just need the output waveform solid. That is why I can't toggle the lines inside the interrupt.Code:REG_TC6_CTRLBSET = TC_CTRLBSET_CMD_READSYNC;while(REG_TC6_SYNCBUSY & TC_CTRLBSET_MASK);if(REG_TC6_COUNT16_COUNT > 500)DEBUG_LINE_HIGH(); // no output on scope if both wavegen and int enabledelseDEBUG_LINE_LOW();Can I use the wavegen feature and output events for an interrupt source?Setup code ..Code:REG_TC6_CTRLA = 0; // resetwhile(REG_TC6_SYNCBUSY & TC_SYNCBUSY_ENABLE);REG_TC6_CTRLA = TC_CTRLA_MODE_COUNT16;REG_TC6_COUNT16_CC0 = 10000; //while(REG_TC6_SYNCBUSY & TC_SYNCBUSY_MASK); //REG_TC6_COUNT16_CC1 = 5000; //while(REG_TC6_SYNCBUSY & TC_SYNCBUSY_MASK); //REG_TC6_WAVE = TC_WAVE_WAVEGEN_MPWM;//REG_TC6_INTENSET = TC_INTENSET_MC0;REG_TC6_CTRLA |= TC_CTRLA_ENABLE;while(REG_TC6_SYNCBUSY & TC_SYNCBUSY_MASK);Thanks

author: ataradov
author_rank: Super Contributor
timestamp: September 13, 2020, 10:29:04 pm
content: How does your interrupt handler looks like? Do you clear the flag before exiting?
SEGGER's IP over USB - Page 1
Forum section: electronics / general

author: purfield
author_rank: Regular Contributor
timestamp: September 10, 2020, 04:32:48 pm
content: I'm working on a project that uses a microcontroller and it would benefit from something like this:https://www.segger.com/products/connectivity/emusb-device/add-ons/ip-over-usb/#resource-usageIt's a software stack by SEGGER that allows a microcontroller to run a web server connected over USB to a host. The only problem is that the pricing from SEGGER is a bit hard to swallow (looks like maybe $10k?)Has a similar approach ever been implemented with open source?

author: ajb
author_rank: Super Contributor
timestamp: September 10, 2020, 05:42:38 pm
content: That's kinda neat. I doubt there's an existing complete alternative, but you can get partway there with LWIP and any existing web server library that is designed to work with it. That leaves the USB side of things, which presumably uses CDC-ECM and appropriate class drivers? I wonder how many MCU vendors include CDC-ECM in their USB frameworks. XMOS has an appnote for IP over USB that may help:https://www.xmos.com/download/AN00131:-USB-CDC-ECM-Class-for-Ethernet-over-USB(2.0.2rc1).pdf

author: ehughes
author_rank: Frequent Contributor
timestamp: September 10, 2020, 06:35:58 pm
content: Well, if it is for commercial work then that cost is worth it.tinyUSB has a good device stack.https://github.com/hathach/tinyusb/tree/master/examples/deviceIt has a USB device example to implement network + a webserver.

author: hans
author_rank: Super Contributor
timestamp: September 10, 2020, 07:21:44 pm
content: The architecture picture says it all; the Segger solution relies on USB-ECMI think there are plenty of "examples" around for microcontorllers such as the STM32 and the like:https://github.com/search?q=usb+ecm&type=Repositoriesedit:Also interesting keywords are CDC-ECM and RNDIS (although I believe that's a different protocol/standard entirely)

author: purfield
author_rank: Regular Contributor
timestamp: September 10, 2020, 10:53:24 pm
content: Awesome, thanks for the tips everybody!

author: theatrus
author_rank: Frequent Contributor
timestamp: September 11, 2020, 06:51:22 am
content: I'm glad we've moved on from RNDIS

author: JoeyG
author_rank: Regular Contributor
timestamp: September 12, 2020, 09:29:47 am
content: Or something ready madehttps://www.microchip.com/wwwproducts/en/LAN7500

author: RRCXUD
author_rank: Newbie
timestamp: September 12, 2020, 09:42:10 am
content: If you are using STM32, ST USB library supports both ECM and RNDIS.https://github.com/STMicroelectronics/stm32_mw_usb_deviceYou can find webserver over RNDIS examples in their cube packages.
CORDIC, FMAC and PSSI in stm32h72x 73x - Page 1
Forum section: electronics / general

author: mach665
author_rank: Newbie
timestamp: September 09, 2020, 05:46:58 pm
content: The new STM32H72x and 73x serials have cordic coprocessor, filter math accelerator and parallel synchronous slave interface. Interesting for high speed ADC and DSP applications.

author: dmendesf
author_rank: Frequent Contributor
timestamp: September 12, 2020, 02:58:33 am
content: Yes. I just noticed that yesterday. Haven't used FMAC but seems it's got no performance advantage over ARM software (just releases the core to do something else parallel to the calculations). Is that your understanding? PSSI seems perfect to connect to a FTDI FIFO in master mode (used to need a FPGA to do that).
STM32F411 + DMA - Page 1
Forum section: electronics / general

author: 3dgeo
author_rank: Frequent Contributor
timestamp: September 10, 2020, 03:17:12 pm
content: Hello,I'm migrating from ArduinoIDE to CubeIDE, already ported few libs/classes that works with regular SPI/I2C, but when I use DMA equivalent functions it's just do nothing. I think my setup in CubeMX was correct to make it work, but it doesn't...Logic analyser detects no output in DMA mode.I'm totally lost, so any ideas how to solve the issue is appreciated..

author: MasterT
author_rank: Frequent Contributor
timestamp: September 10, 2020, 07:32:29 pm
content: Have you seen examples, provided by stm32cubemx ?../STM32Cube/Repository/STM32Cube_FW_F4_V1.25.0/Projects/STM32F411E-Discovery/Examples/I2CThere are 6 projects for I2C, including DMA. Study them first.

author: 3dgeo
author_rank: Frequent Contributor
timestamp: September 11, 2020, 06:56:13 pm
content: I have no idea how to do that, as I've said – I'm new to Cube.Can someone just drop main.c code example that uses I2C + DMA or SPI+DMA?I just need other stuff besides "HAL_I2C_Master_Transmit_DMA(), cuz clearly I'm missing something.
STM32H SPI low lever transfer - Page 1
Forum section: electronics / general

author: ali_asadzadeh
author_rank: Super Contributor
timestamp: August 06, 2020, 12:48:14 pm
content: Hi,I want to transfer 8bit data in Register mode, using STM32H,here is my code snippet,QuoteBut, this code does not work! any Ideas?

author: Sal Ammoniac
author_rank: Super Contributor
timestamp: September 02, 2020, 03:52:50 am
content: Please define “does not work”. We don’t have crystal balls...

author: ali_asadzadeh
author_rank: Super Contributor
timestamp: September 02, 2020, 06:27:14 am
content: QuoteIt does not make any SPI transaction

author: Mecanix
author_rank: Frequent Contributor
timestamp: September 02, 2020, 10:11:38 am
content: Need to see your main() and how you init the clock and spi modes. Have a look at the generic driver (stm32h7xx_ll_spi.h) and see if you haven't missed anything...

author: Sal Ammoniac
author_rank: Super Contributor
timestamp: September 04, 2020, 06:26:05 am
content: Yes, please show us all of your code.The documentation for the SPI peripheral in the STM32H7 series is utter crap and reads like it was written by an eight year old for whom English is their fifth language.

author: Mecanix
author_rank: Frequent Contributor
timestamp: September 04, 2020, 10:03:17 pm
content: Quote from: Sal Ammoniac on September 04, 2020, 06:26:05 amLL's #UM2217https://www.st.com/resource/en/user_manual/dm00392525-description-of-stm32h7-hal-and-lowlayer-drivers-stmicroelectronics.pdf

author: Sal Ammoniac
author_rank: Super Contributor
timestamp: September 07, 2020, 05:44:27 pm
content: Quote from: Mecanix on September 04, 2020, 10:03:17 pmThat’s the documentation for the Hal and the LL drivers. I was referring to the description of the SPI peripheral in the STM32H7 Reference Manual. You know, the one that describes the operation of the peripheral at the register level?Not everyone uses ST’s libraries—some of us write our own. Sometimes this is more difficult than it needs to be due to shitty documentation from the vendor. IMO, there’s no excuse for this. These documents should be written by a collaboration between technical writers and the engineers who designed the chip, and either the technical writer should be a native English speaker, or the entire document should be proofread by a native English speaker. The document I’m referring to above has so many grammatical and phrasing errors that it’s very difficult to extract the meaning from the text.

author: jnz
author_rank: Frequent Contributor
timestamp: September 07, 2020, 07:45:42 pm
content: I'm going with he didn't turn the clocks on to the SPI and GPIO peripherals.

author: ali_asadzadeh
author_rank: Super Contributor
timestamp: September 08, 2020, 06:17:10 am
content: QuoteThe clocks are On,do not worry,Have you done any Direct register SPI transfer in H series? if so, please share the code.

author: jnz
author_rank: Frequent Contributor
timestamp: September 08, 2020, 04:04:09 pm
content: Quote from: ali_asadzadeh on September 08, 2020, 06:17:10 amI didn't see that when you posted your code.
Innovateking Schematics - Page 1
Forum section: electronics / general

author: cosmarchy
author_rank: Contributor
timestamp: August 17, 2020, 09:01:26 pm
content: Hi,I bought one of these Innovateking-EU Nodemcu ESP8266 OLED Wifi Module with 0.96" Display and I'm looking to see whether anyone has any schematics for this board?In order to be able to use this, I'd like to know the type of OLED and how it is connected. I would also like to know how the 5 way button is connected as well any other I/O.Does anyone have or know where to find the schematics for this?Thanks

author: deskpro256
author_rank: Contributor
timestamp: September 08, 2020, 03:56:18 pm
content: Hi.A simple google search of "Innovateking-EU Nodemcu ESP8266 OLED Wifi Module with 0.96" Display" yields this as the first result:https://www.amazon.co.uk/Innovateking-EU-Nodemcu-ESP8266-Arduino-Compatible/dp/B07JFD21SWWhere if you scroll down, you can read more about the product description:QuoteThe OLED is no different from the ones you see in every other hobby project. Only difference is that it's not on a separate board, but integrated into the PCB.Keywords for google: 0.96'' OLED I2CIf you need to see a schematic from the manufacturer, you can look at some info here:https://www.winstar.com.tw/products/oled-module/graphic-oled-display/0_96-oled.htmlThese are usually with SSD1306 chip on flex, so you only need to decide what interface to use.Anyway, also in that same first link:QuoteAlso found some more info about a similar board here so you could check if the connections are the same:https://www.tindie.com/products/lspoplove/dstike-wifi-deauther-oled-v6/There are written connections for most things you could be interested.If you need the schematics you could take a multi meter and beep the connections.There should be enough info here to get you going.
Zero bit bonkers - Page 1
Forum section: electronics / general

author: PerranOak
author_rank: Frequent Contributor
timestamp: August 26, 2020, 04:31:03 pm
content: I created a simple programme to view the registers in a PIC16F877A with each of the PORTB pins connected to a LED:Code:#define _XTAL_FREQ 12000000#include <xc.h>#pragma config FOSC = HS#pragma config WDTE = ON#pragma config PWRTE = OFF#pragma config BOREN = ON#pragma config LVP = OFF#pragma config CPD = OFF#pragma config WRT = OFF#pragma config CP = OFFint x = 1;void main(){TRISB = 0;x = x - 1;PORTB = STATUS;while(1) {}}I noted that bit4 (TO) was initially set then went low as the WDT came in, as expected. Then I noticed that bit2 (zero bit) was set. The relevant bits of STATUS register are:bit 4 TO: Time-out bit1 = After power-up, CLRWDT instruction or SLEEP instruction0 = A WDT time-out occurredbit 3 PD: Power-down bit1 = After power-up or by the CLRWDT instruction0 = By execution of the SLEEP instructionbit 2 Z: Zero bit1 = The result of an arithmetic or logic operation is zero0 = The result of an arithmetic or logic operation is not zerobit 1 DC: Digit carry/borrow bit1 = A carry-out from the 4th low order bit of the result occurred0 = No carry-out from the 4th low order bit of the resultbit 0 C: Carry/borrow bitSo, I added a simple line of arithmetic with x = 1 to begin and got the following, surprising (to me), results [Z, DC, C]:x = x - 1 the answer is 0 but STATUS reg says [0, 0, 0]x = x + 10 the answer is 11 but STATUS reg says [1, 0, 0]x = x - 10 the answer is -9 but STATUS reg says [1, 1, 1]Therefore, this is the exact opposite from what I would expect. If the arthimetic operation produces a zero then Z should be set!Any help with where I went wrong this time please?Cheers.

author: hexreader
author_rank: Frequent Contributor
timestamp: August 26, 2020, 05:08:41 pm
content: The status register bits are as described in the relevant datasheet after eachmachine codeinstruction.There is no requirement for your C compiler to set the STATUS register to any particular state.A C code instruction is a very different thing to a machine code instructionEDIT: minor correction C to STATUS

author: PerranOak
author_rank: Frequent Contributor
timestamp: August 26, 2020, 05:18:42 pm
content: Oh! Right, thank you very much.

author: TomS_
author_rank: Frequent Contributor
timestamp: September 06, 2020, 06:51:10 am
content: You will need to look at the assembly listing of your program, that will show you the list of machine instructions each line of C has been translated to. Usually this is generated into a separate file in your project directory, and there may be a compiler option to enable/disable it.As hexreader suggests, you will find there are usually several of these instructions per line of C code, and likely one or more of these instructions is modifying the status bits before you are able to output them.You could possibly use inline assembly to overcome this.
Is PORTA.4 of PIC16F628A nonfunctional as a digital output pin? - Page 1
Forum section: electronics / general

author: asadulhuq
author_rank: Contributor
timestamp: September 02, 2020, 07:24:42 pm
content: Dear All,I am trying to use the PORTA.4 of PIC16F628A as a digital output pin. Seems that the pin (A4) does not work as digital output. It is always 0 and inactive. However, POERTA3 works as digital output.I have short of pins. So I need to configure PORTA4 into digital output.Can one please shed light on this issue? Thanks. BTW, I connected a pull up resistor from 1k to 10k, but no luck yet.You may please look at the Proteus design attached bellow.

author: hexreader
author_rank: Frequent Contributor
timestamp: September 02, 2020, 07:38:07 pm
content: Disable comparators (CMCON = 7) to use RA4 for outputConnect the other side of LS1 to Vdd, not ground and keep RA4 normally high. RA4 is an open drain output.Depending upon exactly what kind of device LS1 is, you might want to put a flyback diode across it.

author: asadulhuq
author_rank: Contributor
timestamp: September 03, 2020, 07:05:45 am
content: hexreader<<Thanks a lot. Your info is very correct! Now RA4_bit works perfectly. By the way, I have connected an LED indicator with the PORTA.4 instead of the speaker. The speaker has been moved to RA2. Thanks again. Now, I feel a question, what is the benefit of putting just a single pin as an open drain output! I have seen on net that this pin has made lot of confusion to so many people. However, my problem has been solved so I am happy!
MPLAB X vs Atmel Studio - Page 1
Forum section: electronics / general

author: Kalcifer
author_rank: Regular Contributor
timestamp: September 02, 2020, 04:47:06 am
content: So Microchip acquired Atmel who offered Atmel Studio for AVR development, but Microchip already had MPLAB X for PIC. I have a feeling one will get phased out over the other, and since MPLAB X was originally Microchip's does this mean that Atmel Studio will cease to exist?

author: westfw
author_rank: Super Contributor
timestamp: September 02, 2020, 04:59:09 am
content: Maybe. They've added AVR and SAM support to MPLABX. And re-spun their ARM/CMSIS include files, so that MPLABX has different defines than AS7.I don't believe that they've said, one way or another. At least, not without non-disclosure terms.

author: Lindley
author_rank: Regular Contributor
timestamp: September 02, 2020, 09:07:47 am
content: Hi,Excuse our lack of knowledge, but does the latest MPlabX allow the use of Arduino boards / C++ code and also boards like the ESP32 range ?If it does, does it actually work ok ? know from the early days of MplabX it had many problems, thats why we stuck with the old Mplab IDE at that time.
MLX90614 IR temperature Sensor With Stm32 in arduino IDE Problem - Page 1
Forum section: electronics / general

author: mr.rohit30@
author_rank: Newbie
timestamp: September 07, 2020, 05:46:23 am
content: Hello all,i am using MLX90614 IR temperature Sensor with stm32f103 controller.for programming i am using arduino ide.when i interfaced IR sensor with arduino boards using adafruit library that time sensor works properly.but when i tried with stm32 controller with same library that time sensor gives some 1037.33 something readings. MLX90614 sensors not work properly with stm32f controller in arduino ide in my case.please suggest me any solution for my problem statement.Thanks in Advance.
dsPIC33E DSP in MPLABX XC16 - Page 1
Forum section: electronics / general

author: NiHaoMike
author_rank: Super Contributor
timestamp: August 30, 2020, 10:26:20 pm
content: Is there a good example out there of how to properly implement DSP using MPLABX XC16 on the dsPIC33E? The examples I have seen are in assembly, but I prefer to use C.I'm looking to implement a power measurement algorithm that takes in two signed arrays of 16 bit voltage and current readings (1024 samples long, about 10-20 times per second) as well as measure the DC offset of those readings so they can be compensated for during the downsampling stage. I know I could use a standalone power meter chip for that but I'm already using the dsPIC for other tasks like generating the subcarrier frequencies and encoding data for transmission over the power lines.

author: JPortici
author_rank: Super Contributor
timestamp: August 31, 2020, 05:39:22 am
content: Nah, just use assembly. Better yet, create a function in assembly and call it from C with a function prototype.. i can show you how if you needThe reason is that some instructions like REPEAT and DO are not used by the compiler (exception: REPEAT is ALWAYS used along with the divide instruction as it's a requirement)Also, you can't use some specialized functions like the modulo address generatorAlso, the usage of the builtins that have to deal with the accumulators is clunky at best.Also, the compiler may not be as smart in register usage with dsp instructionsAlso, depending on the dsPIC in question you may want to do the thing in its own ISR using its own register set like for mantaining pointers and intermediate results. Better handle that in assemblyAt first for DSP and lower level stuff like table load and store in flash i used inline assembly, then i converted everything to C because it's better that the compiler don't see inline assembly (it breaks its operations, also easier to mantain), then i created assembly files called with C function prototypes, the best approach

author: Berni
author_rank: Super Contributor
timestamp: August 31, 2020, 06:14:33 am
content: You can add a single assembly file into your project, write a function in it and then call that function from the C code.But for munching 20000 samples per second i really don't see why it would need to be tightly optimized DSP code. Just do it in C, turn on optimizations and it should be plenty fast enough. You can try a bit of manual loop unrolling to help the loop run faster. But if its still too slow for you then just go look into the disassembly of this C function and see what is taking too long, perhaps giving you hints on how to write the C function better. And if that is still not fast enough you could just copypaste the disassembled function into a assembler source file and optimize it yourself by hand.Squeezing the very last drop of performance out of a CPU unfortunately does mean messing with assembler. But if you do things right C code should be fast enough for the job in most cases.
PICKit Plus for PICKIT2 and PICKIT3 programmers - latest news - Page 1
Forum section: electronics / general

author: Anobium
author_rank: Regular Contributor
timestamp: August 29, 2020, 09:42:57 am
content: So, summer in the UK is over and it is time to share progress. Some new regarding PICKitPlus - the software the uses the Microchip PK2 and PK3 to program legacy and new microcontrollers from Microchip.thank you for everyone's support to keep this project going and we have been working all summer to improve and widen supports as follows:Linux version of PKCMD - PKCMD-LX is now under Alpha testPICKitPlus updates and release news for WindowsPICKitPlus - PICKitAutoWatch and PICKitEasyLinux version of PKCMD - PKCMD-LXWe are very pleased to announce the release of the Linux version of PKCMD: PKCMD-LX. We are now at the alpha stage of development, and the testers are actively involved. The next stage of the beta program is expected to run for several weeks, or until the product is stable and then we will formally release. This is the Personal Computer version, designed to run on all flavours of Linux, both 32 and 64 bit.The software is simple to use and simple to use. We are using AppImage so the install is very easy.This is huge investment by us. But, these are exciting developments for the software as it shows what can be with the PK2 and PK3 programmers!If you want to join the PKCMD-LX please ping me and we can get you involved. I would expect the test program to cease at the end of September 2020.PICKitPlus GUIs applications for WindowsWe are continually enhancing the software. We do get requests for enhancements, and, we are still fixing latent issues. We are now at release 4.61.0.57We recently added full UserID support for the PIC18FxxQ10 family, add PIC24Fxxx support and now we are adding PIC18FxxQ43 support.The PICKitPlus GUIs now performs a lot better with the progress bar being updated consistently and the GUI has a lower priority in terms of the display window.We are now at release 2.61.217 of the parts database - seehttps://github.com/Anobium/PICKitPlus,remember you can use the parts database with the old Microchip software but the newer microcontrollers will need PICKitPlus software.We have added more EEPROMsPICKitPlus - PICKitAutoWatch and PICKitEasyWe release new software for Windows. PICKitAutoWatch and PICKitEasy.PICKitAutoWatch - software the enables you to automatically program when the source HEX file is changed. This eases the integration with IDEs and compilers.PICKitEasy - the simplest way to program a microcontroller. A really simple user interface with support the full range of PICKitPlus support parts.Our website is here:www.pickitplus.co.ukand the latest parts database is here:https://github.com/Anobium/PICKitPlusAgain, thank you for everyone's support to keep this project going!Evan
PIC16f676 external crystal issue  - Page 1
Forum section: electronics / general

author: arslan43711
author_rank: Contributor
timestamp: August 28, 2020, 07:25:23 pm
content: Hi,I am using pic16f676 to blink the (for example) led now when i select the internal oscillator led blinks perfectly fine but when I change the oscillator to external XT (my crystal is 4 MHz) it does not works. While crystal has 33pF caps with its legs. Than i changed the caps to 22pF it worked again for 24hr then it stop working again . Now I changed the XT in configuration bits to HS it started working again. Can any one explain what might me the cause?
CH341A Programmer - Page 1
Forum section: electronics / general

author: playtime
author_rank: Newbie
timestamp: August 24, 2020, 03:58:03 pm
content: Hi,My Onkyo receiver got frozen and behaving stubborn.Can I program M95640WP using CH341A Programmerany help in this matter shall be highly appreciated.datasheet included herehttps://ibb.co/1JTWkLsthanks in advance

author: ambrosia heart
author_rank: Regular Contributor
timestamp: August 27, 2020, 01:49:55 am
content: My Onkyo receiver got frozen and behaving stubborn.Why do you think this very typical fault found in onkyo av-amp is related to the MMP, main micro-processor?In fact, even you change the MMP circuit board from another normal one, will not get your problem fixed.Your approach is totally wrong.The problem comes from the front panel.
Using the CTMU on the PIC32MX250F128B chip - Page 1
Forum section: electronics / general

author: DennisBingaman
author_rank: Newbie
timestamp: August 26, 2020, 11:13:38 pm
content: This is my first attempt to use the CTMU to measure capacitance. The code is to setup AN5 for the capacitance measurement, it then sends a pulse to an FPGA that creates the Edge1 and Edge2 pulses for the CTMU. The problem is, it does not appear to be charging the capacitor. I removed the capacitor and used a scope to view the output, I was expecting a rapid ramp to the 3.3V rail, because of the low capacitance, but nothing happens. Also the ADC conversion is never kicked off by the CTMU.Attached is the code along with a picture of the scope capture. The blue trace is a trigger to the FPGA to generate Edge1 and Edge2, Scope is set for 10us per division. The red trace goes to CTED6 and the green trace goes to CTED13. The gold trace at the top is the voltage on AN5. As you can see the current source never turns on for whatever reason, and the trace stays at zero.Any help greatly appreciated!
Which one is the minimum pin numbered PIC with 3 ports? - Page 1
Forum section: electronics / general

author: asadulhuq
author_rank: Contributor
timestamp: August 26, 2020, 10:39:36 am
content: I am looking for a PIC Microcontroller which has minimum number of pins but contains 3 ports (A,B,C) and other standard functions. Please some one let me know. BTW, I am new to Microcontroller devices.Thanks.

author: Dabbot
author_rank: Regular Contributor
timestamp: August 26, 2020, 10:45:44 am
content: Do all ports need to have all 8 bits available?If not, how about:https://www.microchip.com/wwwproducts/en/PIC16F18346

author: JPortici
author_rank: Super Contributor
timestamp: August 26, 2020, 10:53:49 am
content: while in theory you could get by with a 28 pin device (8+8+8+MCLR+VDD+VSS+VSS) in reality you have to go for 40/44/48 pin devices, because oscillator and programming pins take up space.Almost any one of the larger devices will do

author: NorthGuy
author_rank: Super Contributor
timestamp: August 26, 2020, 01:47:12 pm
content: Some 28-pin parts have 3 full 8-bit ports - PIC16F15356, for example. If your "other standard features" also require pins then you need something bigger.

author: asadulhuq
author_rank: Contributor
timestamp: August 26, 2020, 05:27:19 pm
content: Thank you.
LAN8710A not working with ESP32 - Page 1
Forum section: electronics / general

author: DonnieBrodan
author_rank: Contributor
timestamp: August 19, 2020, 05:08:34 am
content: I am trying to troubleshoot LAN8710A chip connected to an ESP 32, I have paid an engineer to design this circuit for me and I'm just looking through the gerber files. In the schematic I have this part here:When I look at this in the gerbers I can see C14, C15 and C16 are not actually wired as in the schematic and are instead just connected to the power and ground planes by vias. Is this bad?

author: nikodem
author_rank: Regular Contributor
timestamp: August 19, 2020, 06:16:31 am
content: Yes, it is bad, it should be connected to the power pins in order to work properly.

author: DonnieBrodan
author_rank: Contributor
timestamp: August 19, 2020, 07:16:22 am
content: was watching an EEVblog video where Dave talked about putting caps close to the chips.. kinda figured the layout I have been given completely disregards that..I guess now I will have to find the literature that explains this, as my designer likes to make excuses for anything he can. I am getting a trial of allegro, so hopefully I can fix this all up myself, and hopefully export to a KiCad compatible file or something in the longterm..I just removed my chip and cleaned the pads and reflowed it and it worked. amazing.. none the less.. will need to actually wire it properly

author: nikodem
author_rank: Regular Contributor
timestamp: August 25, 2020, 08:46:03 pm
content: Quote from: DonnieBrodan on August 19, 2020, 07:16:22 amIf you would need any help with PCB design drop me a line, I will be glad to help.
ATTiny13A and DHT11 data to serial problem - Page 1
Forum section: electronics / general

author: CyberBob
author_rank: Contributor
timestamp: August 25, 2020, 12:09:22 pm
content: I'm trying to collect temperature and humidity data from a DHT11 module and display that data in the Serial Monitor. I've found an example that uses uart here:https://blog.podkalicki.com/attiny13-reading-temperature-and-humidity-from-dht11/The example utilises pin PB0 (physical pin 5) for data collection by the DHT11. I have to use another pin as I use physical pins 5 and 6 for Rx/TX to monitor the serial output. I have connected the DHT data pin to PB4 (physical pin 3) and altered the program to serial print but I get a temperature reading of 160 degrees and a humidity of reading 64%. These don't change when I alter the sensor's environment. I have done the following with the original program:Changed from pin 5 to pin 3 for the data pinCommented out Serial.begin (19200); as I monitor the serial at 57600 baudChanged the uart_put commands to:Serial.print ("T:");Serial.print (temperature);Serial.print (" C, H:");Serial.print (humidity);Serial.print ("%\n");Serial.println ("");At the top of the original program are these comments:* Settings:* FUSE_L=0x6A* FUSE_H=0xFF* F_CPU=1200000I tried altering the CPU from 9.6Mhz to 1.2MHz before uploading the program but the result was unreadable output (at any baud rate). I changed back to using 9.6Mhz and the serial output was as expected and readable.I must be close to resolving this as, as I said earlier, I get text and data displayed in the serial monitor. It is just inacurate and doesn't change.Any help would be greatly appreciated.Keep safeThanks

author: ggchab
author_rank: Frequent Contributor
timestamp: August 25, 2020, 03:24:06 pm
content: Communication is over a "1-wire" bus that needs a pull-up resistor. Is it installed ? The bus also requires some precise timing. Do you have access to a logic analyzer to look at the signals ?

author: CyberBob
author_rank: Contributor
timestamp: August 25, 2020, 04:47:57 pm
content: Thanks for your response ggchabNo, I don't have access to a logic analyzerRob
"Set option byte address failed" GD32 RISC-V - Page 1
Forum section: electronics / general

author: rafal2808
author_rank: Newbie
timestamp: August 25, 2020, 02:00:36 pm
content: Hi,Recently I decided to play with the GD32 RISC-V board, but unfortunately I ran into a problem. After starting the "GigaDevice Dfu Tool" configuration tool, the message "Set option byte address failed" is displayed and the program exits after a while. I would like to add that the board is correctly detected by the system. Has anyone encountered such a problem and knows how to solve it?
BOOT0 pin of STM32F042K6T6 micro is grounded? - Page 1
Forum section: electronics / general

author: zenerbjt
author_rank: Regular Contributor
timestamp: August 23, 2020, 07:52:16 pm
content: Dear Engineers, please may i ask about the BOOT0 pin (pin 31)of the STM32F042K6T6 micro?. (LQFP32 footprint)...as follows....We are updating a PCB with a STM32F042K6T6 micro on it.For some reason, the PCB has pin 31 (BOOT0) of the micro connected to GND. This does not seem right. Please could you confirm that this seems wrong?STM32F042K6T6 microcontroller datasheethttps://www.st.com/resource/en/datasheet/stm32f042k6.pdf

author: uer166
author_rank: Super Contributor
timestamp: August 23, 2020, 08:27:42 pm
content: The reference manual is pretty clear about the boot modes (see attached). In all my designs I have the BOOT0 pin grounded via a resistor, but also a unpopulated pullup in case I need to boot from system memory (bootloader) or SRAM in development.In 99% of designs that pin is grounded. Why do you think that is wrong?
STM32 bitmap hex tables - Page 1
Forum section: electronics / general

author: strawberry
author_rank: Super Contributor
timestamp: August 23, 2020, 01:48:24 pm
content: how to properly read/call HEX tables?Code:.cconst uint8_t t030rs[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ####0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ########0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ###########0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ###############0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // #############...Code:.hextern const t030rs[];Code:void drawBitmap(int16_t x, int16_t y, uint8_t *bitmap, int16_t w, int16_t h, uint16_t color) {int16_t byteWidth = (w + 7) / 8; // Bitmap scanline pad = whole byteuint8_t byte = 0;// startWrite();for (int16_t j = 0; j < h; j++, y = y + 1 ) {for (int16_t i = 0; i < w; i++) {if (i & 7)byte <<= 1;elsebyte = bitmap[j * byteWidth + i / 8];if (byte & 0x80)writePixel(x + i, y, color);}}// endWrite();}
MikroC Pro Push Button sense program - Page 1
Forum section: electronics / general

author: asadulhuq
author_rank: Contributor
timestamp: August 22, 2020, 07:27:36 am
content: Dear All,I want to understand following button sense program, specifically the meaning of the following part of the program-(Button(&PORTB, 0, 1, 1)). Please consider that I am new to PIC programming. Thanks in advance.///////////////////////////////////////////////////////////////////////////do {if (Button(&PORTB, 0, 1, 1)) { // Detect logical oneoldstate = 1; // Update flag}if (oldstate && Button(&PORTB, 0, 1, 0)) { // Detect one-to-zero transitionPORTC = ~PORTC; // Invert PORTColdstate = 0; // Update flag}} while(1);//////////////////////////////////////////////////////////////////Source of the code:https://download.mikroe.com/documents/compilers/mikroc/pic/help/button_library.htm

author: Ian.M
author_rank: Super Contributor
timestamp: August 22, 2020, 08:05:38 am
content: From the context,Button(&PORTB, 0, 1, 1)obviously returns something to do with the state of a button switch attached to a Port B pin.Mikroeletronika's MikroC libraries are closed source. Short of disassembling your code and studying what the Button() function compiles to (difficult and confusing even for an expert), there is no way to gain insight into its internals.The best you can do is look it up in the manual, check the permitted parameter values and their meanings and treat it as a black box function with a 'magic' invocation.

author: ggchab
author_rank: Frequent Contributor
timestamp: August 22, 2020, 08:57:22 am
content: I found thisCode:unsigned short Button(unsigned short *port, unsigned short pin, unsigned short time, unsigned short active_state);on this pagehttps://download.mikroe.com/documents/compilers/mikroc/pic/help/button_library.htmSo, in your code, the button seems to be connected on RB0 (2 first parameters: &PORTB = port address ; 0 = line of the port).The third parameter is a debounce period in ms .The last parameter is a button state. If the current state is that one, the function returns 255, otherwise, 0

author: Ian.M
author_rank: Super Contributor
timestamp: August 22, 2020, 09:16:35 am
content: That seems quite horrible. Does that mean that every time you invoke Button() it waits around for the debounce period to expire, or, *worse* does it extend the period it waits by the specified debounce period every time it detects a transition? If so, good luck maintaining a responsive main loop if you are polling a lot of buttons and need longer debounce periods!IMHO, as soon as you have gained enough skills to move on to writing serious programs, throw out that library function and write your own multi-button debouncer that runs in the background off a timer interrupt. Debouncing can be far from simple. See Jack Ganssle's articleA Guide to Debouncing. Part one defines the problem, and part two concentrates on hardware and software solutions.
MPLAB SNAP to ATSAMC21G18A: What is SWO? - Page 1
Forum section: electronics / general

author: NivagSwerdna
author_rank: Super Contributor
timestamp: August 12, 2020, 10:58:27 am
content: I was about to assemble a prototype which uses ATSAMC21G18A (a new device to me)... being SAM I thought I would use a MPLAB SNAP programmer which I bought for very little at the last Microchip Dev tool sale...Anyway... My board has a connector with VTG, VSS, nRESET to p20, SWCLK to p45 and SWDIO to pin 46So I was about to connect it all up and then I noticed...SWOWhat is SWO? Do I have a SWO?

author: NivagSwerdna
author_rank: Super Contributor
timestamp: August 12, 2020, 11:09:27 am
content: Ah... looks like it is SWOhttps://developer.arm.com/documentation/ddi0314/h/serial-wire-output/about-the-serial-wire-output?lang=eni.e. a hardware block for serial trace output... looks quite fun and a step up from using a USART TX pinAnyway I'm pretty sure my lowly Cortex M0+ doesn't support it... so will ignore.

author: ataradov
author_rank: Super Contributor
timestamp: August 12, 2020, 05:40:27 pm
content: It is not as fun as it may look. While setting it up on the embedded side is easier than UART, receiving the data on the host site is less fun. Usually you get tied to some questionable interfaces. Using USART and a real terminal is usually way more fun. But also slower.And yes, SAM C21 does not support it.

author: Rudolph Riedel
author_rank: Regular Contributor
timestamp: August 14, 2020, 07:26:45 pm
content: Yes, the C21 does not have SWO.And the last time I tried to flash a C21 with a SNAP it just failed.Every MPLAB-X version so far only made me hope that Atmel Studio keeps running untillI find a new family of controllers from a different manufacturer.

author: bson
author_rank: Unknown
timestamp: August 14, 2020, 07:36:45 pm
content: If you use the vendor supported IDEs the ones I've used can give you a terminal window for it. ST-LinkV3 I believe can also direct SWO to a serial port on the box itself. And OpenOCD has support for it, although if I recall the SWO traces mix in with general console output. But that's not necessarily a bad thing, depending.