hybridfree/eevblog-posts huggingface dataset:
Marshall guitar amplifier footswitch that uses a microcontroller - Page 1
Forum section: electronics / general

author: jschulmang
author_rank: Newbie
timestamp: May 07, 2022, 05:05:53 pm
content: Never mind, please delete.

author: tepalia02
author_rank: Regular Contributor
timestamp: May 16, 2022, 07:09:13 am
content: Hi, what's the question here actually?
Connecting Data I/O 201 eprom programmer to laptop running windows 10 need info  - Page 1
Forum section: electronics / general

author: Paceguy
author_rank: Regular Contributor
timestamp: May 11, 2022, 02:29:01 pm
content: I have a Data I/O eprom programmer that I would like to hook up to a laptop running Windows 10. Can it be done with Windows 10 using Promlink 6.1 and if so do I need a standard RE232 cable or one with pin 2 & 3 crossed over ? Thanks in advance !!

author: elecman14
author_rank: Unknown
timestamp: May 11, 2022, 02:52:35 pm
content: This site has a rs232 cable diagram and discusses the softwarehttp://matthieu.benoit.free.fr/DATAIO_201_programmer_resources.htm

author: Paceguy
author_rank: Regular Contributor
timestamp: May 14, 2022, 11:29:36 am
content: Thank You for the information.
SystemVerilog - Multiple concurrent drivers - Page 1
Forum section: electronics / general

author: santyp18
author_rank: Newbie
timestamp: May 10, 2022, 10:47:05 am
content: Hey guys! I'm working on a project and I have a problem with the construction of the following module:Code:module posiciones( input logic clk, reset,input logic n, s, w, e, esp,output logic secue,output logic [2:0] art);// Contadorlogic [3:0] counter;//Definición de Estadostypedef enum logic [2:0] {Cueva, Tunel, Taberna, Cuarto, Garganta, Tesoro, Cementerio} statetype;statetype [2:0] state, nextstate;//Lógica secueuencialalways_ff@(posedge clk, posedge reset)if (reset)beginstate <= Cueva;counter <= 4'b0000;secue <= 0;endelse if(counter == 4'b1111)beginstate <= nextstate;counter <= 4'b0000;endelsebeginstate <= state;counter <= counter + 4'b0001;end//Lógica Combinacional - Cambio de Estadoalways_combcase (state)Cueva: if (n&e) nextstate = Tunel;else if (~(n&e)) nextstate = Cueva;Tunel: if (s) nextstate = Taberna;else nextstate = Tunel;Taberna: if (e) nextstate = Garganta;else if (w) nextstate = Cuarto;else nextstate = Taberna;Cuarto: if (e) nextstate = Taberna;else nextstate = Cuarto;Garganta: if (esp) nextstate = Tesoro;else nextstate = Cementerio;Tesoro: nextstate = Tesoro;Cementerio: nextstate = Cementerio;endcase// Lógica Combinacional - Salidasassign art = state;assign secue = (state == Cuarto);endmoduleThe Error says:ERROR: [VRFC 10-1546] variable secue might have multiple concurrent driversand it is provocated by the line " assign secue = (state == Cuarto)".How could I fix this?

author: emece67
author_rank: Frequent Contributor
timestamp: May 10, 2022, 11:38:38 am
content: .
How to compile DAPLINK CMSIS from Github project? - Page 1
Forum section: electronics / general

author: mon2
author_rank: Frequent Contributor
timestamp: April 17, 2022, 10:06:12 pm
content: Hi. In an attempt to target the GEEHY APM32F103 device, downloaded and believe to have followed all of the steps noted here:https://github.com/ARMmbed/DAPLink/blob/main/docs/DEVELOPERS-GUIDE.md* installed GNU Arm Embedded Toolchain but have Keil available as welland running into this error:QuoteAnyone have experience with this project ? Will be happy to even compile for the default STM32F103 target.Thanks.

author: eutectique
author_rank: Frequent Contributor
timestamp: April 18, 2022, 01:03:32 am
content: Quote from: mon2 on April 17, 2022, 10:06:12 pmNever saw this project, but the things to check:As I understand the error message, you don't havemakeorarmccin your PATHDid you try-t make_gcc_arminstead?

author: nimish
author_rank: Regular Contributor
timestamp: May 04, 2022, 04:58:11 am
content: You'll need a proper dev env with cross-compiler for arm-none-eabi gcc. Set it to make_gcc_arm, make_armcc uses an older arm specific compiler.I have `python tools/progen_compile.py --parallel --clean` working on a mac so it's totally doable.

author: darkspr1te
author_rank: Frequent Contributor
timestamp: May 04, 2022, 02:22:52 pm
content: Quotein the quoted error is mentioned "build error whilst calling make" , do you have make/cmake installed ? what happens what you just type 'make'darkspr1te

author: DavidAlfa
author_rank: Super Contributor
timestamp: May 04, 2022, 07:42:30 pm
content: Quote from: mon2 on April 17, 2022, 10:06:12 pmWhy go the hard way, building it yourself?Have you tried the latestreleasebinaries? There you have a build for STM32F103.

author: mon2
author_rank: Frequent Contributor
timestamp: May 04, 2022, 09:37:14 pm
content: Thank you everyone for your feedback. After assorted attempts to load the toolchain, did manage to get the projects to compile using Keil.The goal of this torture is to allow us to possibly use Geehy 32F103CBT6 for this task. Ran into more delays in that we can compile for the target .hex / .bin file but could not load into the device.For that requirement, ordered the APEX (Geehy) USB programmer tool from LCSC.COM which arrived late yesterday. Hope to test out the above this week. Will update the thread after some experiments.

author: nimish
author_rank: Regular Contributor
timestamp: May 10, 2022, 03:27:01 am
content: Quote from: mon2 on May 04, 2022, 09:37:14 pmYou're gonna be stuck unless they released a CMSIS-Core library and SVD pack AND it must be up to date. Even big vendors like Infineon aren't compatible
(contactless card) ID-20LF-WR, some working example on the write mode? - Page 1
Forum section: electronics / general

author: DiTBho
author_rank: Super Contributor
timestamp: April 25, 2022, 02:17:56 pm
content: The companyID Innovationsproduces some nice chips able to operate with contactless cards @ 125khz.Some chips come with the choice of internal antenna, some use external antenna, they can be all controlled by command from a serial line, and if you want to read something with a {ID-2LA, ID-12LA, ID-20LA} chip, the Data Format is very simpleCode:Output Data Structure{ STX (02h), DATA (10 ASCII), CHECK SUM (2 ASCII), CR, LF, ETX (03h) }(ASCII stream @ 9600bps, No Parity, 1 stop bit -> "9600-n-1")But the user-manual is confusing and doesn't tell too much about the write-mode of theID-20LAI cannot find more information, neither a working example. Also it's not clear if there is a minimal distance between the sensor and the contact-less cardID-20LF-WR-rw-module-user-manual-v1.03-2011-6-7.pdf(232.49 kB - downloaded 77 times.)

author: DiTBho
author_rank: Super Contributor
timestamp: April 25, 2022, 02:20:07 pm
content: Attached is a schematic example of one of the read-only ID modules.

author: tepalia02
author_rank: Regular Contributor
timestamp: May 09, 2022, 12:37:14 pm
content: Are you using this reader?http://cdn.sparkfun.com/datasheets/Sensors/ID/ID-3LA.pdfAs far as I know, this is RFID reader only. Never heard of using it as an RFID card writer. Let's see if anyone else says otherwise.

author: DiTBho
author_rank: Super Contributor
timestamp: May 09, 2022, 02:35:12 pm
content: Yup, there are two chips.One is read-only, the other can write.

author: DiTBho
author_rank: Super Contributor
timestamp: May 09, 2022, 02:36:53 pm
content: Quote
TouchGFX Screen Change using code - Page 1
Forum section: electronics / general

author: jeet55
author_rank: Contributor
timestamp: May 09, 2022, 12:32:49 pm
content: How do I change the screen currently displayed on the LCD using user code and not using interactions provided in touchgfx designer.How exactly do i handle screen changes in the GUI? using the switch case statement in model class?if someone can provide an example that would be helpfull.
Debugging STM32 HAL/DMA/IRQ - Page 1
Forum section: electronics / general

author: dietert1
author_rank: Super Contributor
timestamp: May 06, 2022, 03:09:23 pm
content: Here i have a little tool for those fighting with STM32 HAL/DMA/IRQ. Invoke with:Code:extern void Trace_Add(char *pcLabel);...Trace_Add("this is a label");...Hope it helps. Using this method i found that a circular DMA for the DAC generated with CubeMX was causing lots of unwanted interrupts. In the example log you can see the UART TX DMA throw two interrupts per packet, while the application only uses the HAL_UART_TxCpltCallback().The trace data table can become a circular buffer in order to trace later in the application.Regards, Dieter

author: DavidAlfa
author_rank: Super Contributor
timestamp: May 06, 2022, 09:10:10 pm
content: Interesting. Where's does the output go? Swo console?

author: dietert1
author_rank: Super Contributor
timestamp: May 06, 2022, 10:04:59 pm
content: No console, no printf, no malloc. I used the debugger to save the Watch panel with the trace data table to a file and Openoffice to format the data.In the example trace one can also see a HAL_UART_TxCpltCallback() before sending a packet. This was another unwanted interrupt that happened when i used__HAL_UART_ENABLE_IT(&huart2,UART_IT_TC);before HAL_UART_Transmit_DMA(). The problem with CubeMX and HAL libraries is that each of those useless interrupts easily wastes 100 or 200 CPU cycles. If the MCU runs at low clock rates for low power reasons, that's a disadvantage. The idea of DMA was saving MCU cycles.Regards, Dieter

author: Kleinstein
author_rank: Super Contributor
timestamp: May 07, 2022, 08:16:39 am
content: The idea with writing trace data to memory is nice.If doing time critical things it may be better to not use the HAL_GetTick function but directly a timer / sysclock counter. For time critical parts it could help to disable the HAL systick interrupts.

author: dietert1
author_rank: Super Contributor
timestamp: May 09, 2022, 11:01:24 am
content: Yes, there is a CPU cycle counter in Arm Cortex that can be used instead, with much better resolution than the ticks.Meanwhile i was able to suppress the "half complete" DMA interrupt. At the end of the packet there are two interrupts: First one when DMA terminates and second one when the UART transmitter finished the last byte. Plus several function calls plus application callbacks. Anyway, it seems to work well. Dead times are in the order of 20 usec, good enough for the application.Regards, Dieter
Any ARM 64 MCU that does full encrypted and signed boot, besides NXP and STM ? - Page 1
Forum section: electronics / general

author: DC1MC
author_rank: Super Contributor
timestamp: May 07, 2022, 03:38:08 pm
content: Hello everybody,out of curiosity, is there any available 64-bit Cortex-A MCU that does HAB style encrypted and signed boot, of course besides iMX series and STM attempt, I have heard that some Allwinner and Rockchip models are doing it, but actual information are hard to find.Any suggestion will be appreciated, if some development boards and chips themselves are available for buying, the suggestions will be double as much appreciated.Cheers,DC1MC

author: DC1MC
author_rank: Super Contributor
timestamp: May 08, 2022, 03:21:48 am
content: Nobody has any recommendations?

author: jeremy
author_rank: Super Contributor
timestamp: May 08, 2022, 03:50:21 am
content: Maybe no responses because there are none to give? I only know of ST and NXP - I assume you don’t want to use them due to lead times?I can’t imagine you could get this sort of thing working without having a direct contact inside Rockchip or Allwinner, those companies aren’t exactly known for documenting anything or providing useful, up to date kernels.

author: SiliconWizard
author_rank: Super Contributor
timestamp: May 08, 2022, 06:06:23 pm
content: Well, good luck getting any information from Allwinner or Rockchip unless you are going to buy a million processors a year. That's the problem.

author: DC1MC
author_rank: Super Contributor
timestamp: May 08, 2022, 06:56:48 pm
content: Quote from: SiliconWizard on May 08, 2022, 06:06:23 pmAh, come on, they were just some examples, at least for Rockchip is all clear, I#ve found the documentation, they even seem to have a nifty windows utility to sign the binaries, I would love to read more but maybe my browser distors the characters, I can only see a few Engrish words there:https://github.com/Nu3001/rkdocs/blob/master/Develop%20reference%20documents/Rockchip%20Secure%20Boot%20Specification%20V1.1%2020131205.pdf

author: fchk
author_rank: Frequent Contributor
timestamp: May 09, 2022, 07:42:06 am
content: The current NVidia Tegra chips on the Jetson processor modules (Xavier etc.) are capable of Secure Booting. The bare chips get used in automotive.However, I don't know if NVidia will speak to you at all. Good luck.fchk
Microcontroller with high speed ADC integrating with a spectrometer module - Page 1
Forum section: electronics / general

author: madan
author_rank: Newbie
timestamp: April 28, 2022, 01:36:58 am
content: Hi,I'm trying to pick a mc for the project. I'd be very grateful if you could give me some advises.I am using Hamamatsu spectrometer head - C12880MA.https://www.hamamatsu.com/content/dam/hamamatsu-photonics/sites/documents/99_SALES_LIBRARY/ssd/c12880ma_kacc1226e.pdfHere is a timing chart.In the beginning I was considering using external ADC, but I couldn't find a MCU that could handle such a high speed with for example SPI.According to my calculations I need XXXMinimum ADC resolution I need:According to the datasheet the typ. saturation voltage at the video signal output is 4.8V and the typ. readout noise is 1.8mV rms.Am I right here?In order to achieve a high dynamic range (measure a sunlight) the integration time need to be as short as possible.Integration time is equal to the high period of start pulse +48 cycles of clock pulses. The start pulse cycle is equal to 381/f(clk) and therefore I need to use a maximum clock frequency that is 5 MHz.Before, when I was considering external ADC with SPI I assumed that 5 MHz is equal to 5 MSPS. But now I dont know how to calculate minimum sample rate ADC needs to have.I already have C2000 Delfino MCU F28379D - 12bit with sampling rate of 3.5 MSPS.I considerSTM32H7A3ZI (NUCLEO-H7A3ZI-Q)LPC54102 (LPC Xpresso 54102)Any other ideas?I will be very grateful for any suggestions.Cheers,Madan

author: Kleinstein
author_rank: Super Contributor
timestamp: April 28, 2022, 08:14:06 am
content: The sensor noise of some 1.8 mV RMS with a 4.3 V range is less than 12 bit resolution. So a 12 bit ADC, even if not perfect should be good enough. For the cases with slow read-out one would have time for some oversampling (e.g. 4 x or 8 x) for single reading. For the case with fast read out, one would likely have time to average over multiple complete scans.The µC internal ADCs usually have an internal S&H stage already and there is likely no real need to add an external one.

author: harerod
author_rank: Frequent Contributor
timestamp: May 02, 2022, 09:16:26 pm
content: Since the C12880MA isn't that cheap after all, I didn't mind giving it some dedicated conversion hardware. If you look at the reference application in the datasheet, I added an ADA4805 as video buffer and fed that signal into an AD7980. My spectrometer also features some light sources. All controlled via an STM32F4. Interfaces include:- C12880MA analog line video output (for oscilloscope)- RS232- USBDevice may be USB-powered or by other 5V source.My design would allow me to bypass the external ADC and feed the signal into an STM32F4 ADC. However, those ADC's are notoriously bad (see Errata). I never saw a reason to test that configurtion.In this thread we discussed some calibration sources:https://www.eevblog.com/forum/metrology/small-and-cheap-spectrometer-calibration-source/msg3559566/#msg3559566
STM32 with Open GL ES2.0 support, how ? - Page 1
Forum section: electronics / general

author: enitalp
author_rank: Newbie
timestamp: May 06, 2022, 07:43:58 pm
content: Hi,i'm playing with multiple STM32 Board with OpenGL support, but there is a single sample on how to display one triangle, can't find that anywhere !Pretty annoyed by that mister STM, if you can't give samples, remove the hardware that is just deadweight.So anyone managed to draw one triangle, or knows how to do it.It feel a big mess.I just want an HAL_OpenGL.h

author: Mechatrommer
author_rank: Super Contributor
timestamp: May 07, 2022, 10:55:04 am
content: Quote from: enitalp on May 06, 2022, 07:43:58 pmmaybe the trick is to learn how to do it on a full fledged PC, then you'll maybe figured out later OpenGL (or DirectX) type of class library is "polymorphic" in nature that their very tight SW to HW integration makes them behaves differently from machine to machine basis depending on what the machine's instructions can support (usually on advanced features instruction sets).. i never tried to learn them fully because i dont have a practical need, i only touched the surface. in short, you'll need to learn their data structure first and how to integrate you 3D data into them (or textures). you can do that in full fledged PC and then try to admit you'll need to tune down, or figure out another trick on lesser machine if you want to do complex things. for simple triangles, i guess all machines can support the same simple codes, so looking for samples for PC is the way i guess. ymmv.

author: thinkfat
author_rank: Unknown
timestamp: May 07, 2022, 03:02:05 pm
content: OpenGL ES is specified and documented by Kronos Group. The specification includes names for header files. That means that any OpenGL ES example you find on the net should work on any platform. Provided of course the platform has the extensions the example requires.What STM needs to provide, though, is at least an example for the EGL part which covers the platform specific parts of the initialization, at least the part that tells you how map a display surface/layer/window into OpenGL.
(datasheet) AT24C64D-ISO-7816-Card - Page 1
Forum section: electronics / general

author: DiTBho
author_rank: Super Contributor
timestamp: April 24, 2022, 10:59:18 pm
content: The AT24C64D is a 64Kb Serial EEPROM utilizing an I2C serial interface, according toFuturlecthere are ISO-7816 cards using the AT24C64D EEPROM, however the datasheet doesn't mention the pin-out on the ISO-7816 2x4 connector

author: DiTBho
author_rank: Super Contributor
timestamp: April 24, 2022, 11:06:46 pm
content: Googledidn't help, butYandexfound the datasheet for a similar device, the AT24C16D ISO7816 Card.There is a lot of confusion around these devices.
stm32f103-Can't trigger IRQ9_5 interrupt? - Page 1
Forum section: electronics / general

author: kgavionics
author_rank: Regular Contributor
timestamp: April 20, 2022, 05:15:00 pm
content: Hello, I'm a new to the STM32 programming. I'm coming from the AVR ! So don't be too hard on meI'm trying to trigger an interrupt using the below code, but I can't trigger the interrupt. When I press on the switch, nothing happens. I don't know what I'm doing wrong. Can someone help me please?Code:#include <stm32f10x.h>// PA6 connected to an external pull-up resitor and a momentary switchvoid EXTI9_5_IRQHandler(){EXTI->PR |=(1<<6); // Clear pending interruptGPIOA->ODR ^=(1<<7);// Toggle a led connected to PA7}int main(){RCC->APB2ENR |= (1<<0) | (1<<2); //enable GPIOA and AFIO cloksGPIOA->CRL =0x34444444;//P7 output, the rest are inputsAFIO->EXTICR=0;// EXTI6 (BITS 8-9-10-11 are 0000)EXTI->FTSR |=(1<<6);// Falling edgeEXTI->EMR |=(1<<6); // unmasked intp6NVIC_EnableIRQ(EXTI9_5_IRQn);while(1);}

author: hans
author_rank: Super Contributor
timestamp: April 20, 2022, 05:23:38 pm
content: You could try to use IMR instead of EMR of the EXTI registers.Event and interrupts are separate in STM32 (and more ARM CPUs, but not all): interrupts trigger a software interrupt vector, while an event is typically used between peripherals as triggers (e.g. for DMA, timer updates, or other peripheral 'events')

author: kgavionics
author_rank: Regular Contributor
timestamp: April 20, 2022, 05:35:18 pm
content: Thank you very much Hans, by changing EMR to IMR, my code worked right away!Thanks again, you really made my day!

author: DavidAlfa
author_rank: Super Contributor
timestamp: April 22, 2022, 04:47:36 am
content: Was going to say that.Doesn't ARMs need to configure the nvic, setting the jump locations?He's doing it bare-metal so he will have to take care of every single bit.

author: kgavionics
author_rank: Regular Contributor
timestamp: April 23, 2022, 12:57:33 am
content: My code above,is taking care of everything.the only mistake I made is that I used EMR instead of IMR register.
Some notes on AVR-DA timers - Page 1
Forum section: electronics / general

author: T3sl4co1l
author_rank: Super Contributor
timestamp: April 22, 2022, 07:57:32 am
content: FYI:- TCB in "one shot" mode, isn't really triggered. It's more that CNT is reset on event, and stops counting when it equals CCMP. That's it, that's all the logic, there's no flip-flop like the text seems to imply, it's only ever counting because it's unequal, or stopped because it's equal. So, like, STATUS bit is a shortcut for CNT == CCMP, not actually indicating any internal state.So you can trigger a cycle by writing CNT = 0, no events needed.Or if you need to change CCMP to get different delays in real time, whenever CCMP is set below CNT, CNT keeps on counting and overflows and wraps around. You have to write both equal to prime it for another go (but notice, because the comparison goes unequal then equal, it triggers a new output event / WO pulse / interrupt).I haven't checked out the other modes in detail yet but I think they will be consistent with similarly simple logic. I suspect there is no hidden on/off register, it's either stopped because compare, or because it's gated by something else like an input/event. Why the text doesn't just go out and say this, I don't know.- TCD is written confusingly. The thing that stuck with me is the use of words "command" and "synchronization". Is it talking about some special, additional logic or function? Is every transaction routed through some sequential gate, and you can only write one register at a time until each operation goes through? Is it really just the usual clock-domain-crossing registering? Is it like at the bus entrance to the peripheral, instead of to each register? (Actually come to think of it, that's probably what they're doing.) I think they mean "synchronization" as, simply writing to any register on the clock domain, and "command" is only specific bits (CTRLE and CTRLA). Maybe that doesn't really matter much (unless you're using it at a much lower clock rate, any register write will just about instantly go through), but one of those things that, if you don't do it just right, what one thing did you screw up, how do you know?Take note of the errata as well. Like the AVR64DA28-64, enabling TCD ouputs, enables all four outputs, not just the one and other pair they're documented as. Not really very useful anyway (they only mirror the first pair?) but it's two pins you can't use for other things.Tim
PIC18F67J60 + XC8 + TCP Lite stack, need someone who ever work with it. - Page 1
Forum section: electronics / general

author: GymBoss
author_rank: Newbie
timestamp: March 11, 2020, 03:01:25 am
content: Hello. Im trying to make application with this HW\SW but seems stack has bug.The TCP library for some reason cant receive partial packet (doesnt send TCP ACK after buffer reading inside MCU code, and still hold TCP windows at zero).Microchip support pulls time for a month or more. Microchip forum is dead. If you know a place where i can found the answer - it is good if you leave it here.

author: fchk
author_rank: Frequent Contributor
timestamp: March 11, 2020, 09:48:51 am
content: I've built a powerswitch unit with exactly this PIC, but with the older MPLAB8+C18 Compiler (XC8 didn't exist back then), and this device has been runnung for the last 15 or so years.Maybe you can get an old copy of MPLAB+C18 from somewhere.fchk

author: GymBoss
author_rank: Newbie
timestamp: March 11, 2020, 10:10:57 am
content: Quote from: fchk on March 11, 2020, 09:48:51 amNo, i cant =\ Whole project is already on XC8.

author: zero0d
author_rank: Contributor
timestamp: April 21, 2022, 10:10:56 am
content: Hi,did you manage to get TCP Lite Stack + XC8 + PIC18F67J60 to work?Br.

author: 8goran8
author_rank: Contributor
timestamp: April 21, 2022, 05:09:44 pm
content: I think it's worth trying with microchip mla v2014_07_22. Here you can find mla older versions:https://www.microchip.com/en-us/tools-resources/develop/libraries/microchip-libraries-for-applicationsI didn't tested Microchip TCP/IP stack with the XC8 compiler but I used mplabc and PIC18F97J60 15 years ago
Does anyone use the Northern Software NSDSP-2-X PIC programmer? - Page 1
Forum section: electronics / general

author: djsb
author_rank: Super Contributor
timestamp: April 15, 2022, 12:09:11 pm
content: I'm wondering if anyone has used the Northern Software NSDSP-2-X PIC programmer?https://www.northernsoftware.com/nsdsp/p2x.htmI like that there is HVP and LVP programming available. Also, it appears to be able to supply higher current to the target board. I like that the same chip that's used in the programmer can be used in your own prototype/device/product.It does not have programmer to go and is a bit cheaper than the PICKIT 4. What do you think?

author: fchk
author_rank: Frequent Contributor
timestamp: April 17, 2022, 05:26:45 pm
content: I wouldn't buy it for myself.1. For development I do not only want programming but also debugging. Time is money, and I can't afford not using timesavers. This interface seems not to support source code debugging within MPLABX, so for me it is unusable. Period.2. You are not supposed to power your target from the ICSP connector. Vcc on the ICSP is designed only to power the target side of the programmer's level shifters.3. All 16 and 32 bit pics only use LVP, and most 8 bit PICs can also use LVP. HVP is becoming les and less important.fchk
Finding the correct pinning - Page 1
Forum section: electronics / general

author: generic_username
author_rank: Regular Contributor
timestamp: April 14, 2022, 07:46:48 am
content: Hi,I'm starting a new design a longer search we've decided on a specific chip.the "chip" in that case is a bluetooth module BC833M got the footprint.Now I want to use the onboard adc for some simple measurements during operation (12 bit SAC should be more than enough for what I want to do)In the datasheet from the module maker the Pin number of the module as well as the pin number of the chip (Nordic 52833) is given but when I wanted to look up the pin functions I found out that it is indeed a GBA with the typically alphanumeric nummers.My question, is there a way to find out which Pinnumber of the datasheet is the equivalent of the bga chip, like there's a method I'm unaware or is the only solution to this to ask the manufactor of the module?link to module, page 9 for GPIO'shttps://static1.squarespace.com/static/561459a2e4b0b39f5cefa12e/t/61ce2cc8a753012913383896/1640901834393/BC833M_Product_Specifications.pdflink to nordic µCpage 556/557https://infocenter.nordicsemi.com/pdf/nRF52833_OPS_v0.7.pdfthanks in advance

author: gamalot
author_rank: Super Contributor
timestamp: April 14, 2022, 08:08:11 am
content: As far as I know, nRF52833 available in several different packages, the QDAA suffix means QFN40.

author: generic_username
author_rank: Regular Contributor
timestamp: April 14, 2022, 08:15:44 am
content: ohh thank you very much.I searched for different packages but all I found was the datasheet i posted above.you are right there's a qfn 40 version page 560https://www.mouser.at/datasheet/2/297/nRF52833_PS_v1_3-2448715.pdfcheers
Drop-in replacement for MC68HC05 microcontroller? - Page 1
Forum section: electronics / general

author: badgerthing
author_rank: Contributor
timestamp: April 14, 2022, 06:07:08 am
content: I am seeing if MC705P6ACDWE will possibly be a drop-in replacement for the unreliable MC68HC05 mask-ROM microcontrollers used on classic Apple Macintosh motherboards for controlling ADB, RTC, soft-power-on, etc.A lot of classic mac boards are dead due to this chip failing, likely from ESD or possibly the caps that always leak around that area.MC705P6ACDWE is a NRND in-production part. They are out of stock at most distributors, but plenty at others and non-China eBay.Can you see any places I'd come-a-gutser in this endeavor?Opening EETools' programming software and selecting this chip, I only have an area to put the ROM. I don't see any config fuses. Hopefully the ROM doesn't need to be modified to set some mask-level fuses on startup? I don't do much microcontroller stuff, and can't quite decipher the datasheets.The chip in question I'd try replacing is the 341S0417 on the Color Classic motherboard.I found what appears to be a dump of the ROM on a MAME site (4352 bytes).Unless I've missed something silly, I could try to program an image to a couple of MC705P6ACDWE microcontrollers.It uses high voltage like an old EPROM. Doesn't look like many programmers support this model - certainly not my TL866.EETools' ChipMax and TopMax programmers claim to support it, but one of those will cost me $500 USD.
STM32 & USB Audio straming - Page 1
Forum section: electronics / general

author: gab_22
author_rank: Contributor
timestamp: April 03, 2022, 04:52:14 pm
content: Hi there!I'm trying to do a USB to i2s bridge with an stm32 chip: the STM32F429ZI on the Nucleo F429ZI board. I use CubeIDE (the ST inhouse IDE for STM32 family)I tried firstly with the builtin USB stack, and indeed my board is detected as a USB audio deviceBut after some investigations, it seems that this stack support no more than 48 kHz audio streaming, and the code seems very "poor". So I tried to switch to the USB Audio dedicated expansion package, (X-CUBE-USB-AUDIO) but when I try to import it into Cube IDE I got the attached error.Maybe (and probably) I misunderstand something. Someone can help me?

author: PatocheHAM
author_rank: Newbie
timestamp: April 12, 2022, 06:09:30 am
content: HelloI suggest you to post your support inquiries in STMicroelectronics support channel, an FAE will enventually reply. I'll see on my side what I can find.

author: ve7xen
author_rank: Super Contributor
timestamp: April 12, 2022, 06:37:35 pm
content: TinyUSB has UAC2 support and might also be supported on this platform.
Substituting a uC (NXP Kinetis K60) - Page 1
Forum section: electronics / general

author: Jean_valjean
author_rank: Newbie
timestamp: April 12, 2022, 07:36:51 am
content: Dear colleagues,Does someone of You experience by substituting a uC in an existing product? What are Your experiences in this activity?Concretely, I am trying to find a replacement for MK60DX256VMD10 from NXP. Just because it is out of stock everywhere and despite this anomaly we'd like to produce and sell our products.The ideal solution would be (just my sweet dream, I'm afraid) to find something in the same package which is pinout - compatible and the same source code compiles without any bottleneck. (and then I wake up ... )The second best is a code- and peripheral compatible uC which requires either a new board or an adapter-board to fit the pins.Do You have any such experience? Are there proven method to do this?(This is the same issue like the one in topic "Testing BGA uC before use", just another plan to solve the issue somehow.)

author: luiHS
author_rank: Frequent Contributor
timestamp: April 12, 2022, 11:42:00 am
content: Only another microcontroller from the same manufacturer and family could have the same pinout and be compatible with the microcontroller's peripherals. The problem is that if that reference is not in stock, probably no other will be, due to the current world crisis of semiconductors.I have replaced Kinetis MK66 LQFP144 with RT1064 BGA, both from NXP although from very different families, they only share that they are both ARM and use the same MCUXpresso IDE. The changes to be made in the source code were not many because the application was not very complex either, it only needed one UART and a few GPIOs with interrupts.Now I think it's too late to be able to buy a 32-bit microcontroller in quantity to market a product. Maybe some LPCs, but no Kinetis or NXP i.MX are in stock. I bought the RT1064 and STM32H747 in quantity when the crisis began, and thus I was able to get enough to be able to work, but now it is impossible, there is nothing in stock.
Slowing down audio playback STM32 DMA - Page 1
Forum section: electronics / general

author: longh
author_rank: Contributor
timestamp: April 11, 2022, 02:19:04 pm
content: Hello everyone,I'm new to STM32, and I am trying to make a project that when triggered reads audio from an ADC channel into a buffer with a ~100kHz sampling rate while at the same time reading the samples out of this same buffer into the DAC with a ~10kHz sampling rate. The end goal of this is to slow down the recorded audio from a microphone by ~10x.I was able to get this kind of working using the DMA to load from the ADC to the buffer and from the buffer to the DAC. However, this was using a circular DMA mode so the ADC kept re-writing the buffer before the DAC could read it out. I instead want this to operate in "single shot" mode, when triggered the ADC fills up the buffer and then the DAC keeps reading from the buffer until it reaches the end. Then everything stops until triggered again. Here is my attempt to trigger the DMAs to start every 5 seconds, but it doesn't seem to be working.https://github.com/abstractspace/stm32-audio-dmaJust thought I would reach out and see if anyone has any ideas.Thanks,-Hunter

author: longh
author_rank: Contributor
timestamp: April 11, 2022, 03:00:26 pm
content: I think my main question is if I'm restarting the DMAs in the correct way here:https://github.com/abstractspace/stm32-audio-dma/blob/537b8251b3d1da8b30008e79e46f60e4c155c867/Core/Src/main.c#L174after they ADC buffer if filled up. In circular mode they would restart at the beginning of the buffer automatically.

author: DavidAlfa
author_rank: Super Contributor
timestamp: April 11, 2022, 04:52:12 pm
content: You need to set the ADC trigger to TRGO, enable2 continuous dma requests and DMA circular mode, peripheral to mem, configure a timer for 100KHz and select TRGO from update event.Now, when you start the timer the ADC will also sample and store samples at that frequency.Use the dma half-transfer and transfer-complete interrupts to take care of your buffer.For the dac, configure another timer for 10KHz, set DMA in non-circular, non-increase mode, mem to peripheral, src address pointing to the ADC->DR and dst to the dac, that way it'll take the last ADC conversion available without requiring messing with the buffers.
SmartEEPROM on SAMD51 - Page 1
Forum section: electronics / general

author: crm
author_rank: Newbie
timestamp: April 08, 2022, 11:31:16 am
content: I'm trying to understand SmartEEPROM and the buffered mode. I want to fill the whole pagebuffer first, then issue one single SEEFLUSH for a whole page. That seems to work as expected ... as long as all pagebuffer writes are 1->0 transitions. If there is a 0->1 transition, it seems to write the new data to the flash right away. I.e., behaves similar to unbuffered mode.Anyone used and had luck with the SmartEEPROM buffered mode?Here is an example. I'm trying to change 0x03 to 0x05. I.e., bit #2 is going from 0 to 1. No SEEFLUSH. I reset the micro. After the reset I check the value. I expect a 0x03. But I see a 0x05. SmartEEPROM is configured as SEESBLK=1 and SEEPSZ=3. The example prints "Fuses FE9A9239 AEECFFB1" and "SEESTAT=30111".Code:static void bufferedTest(void) {printf("Fuses %08lX %08lX\r\n",*(uint32_t*) (NVMCTRL_USER + 0),*(uint32_t*) (NVMCTRL_USER + 4));printf("SEESTAT=%lx\r\n", NVMCTRL->SEESTAT.reg);NVMCTRL->SEECFG.reg |= NVMCTRL_SEECFG_WMODE;while (NVMCTRL->SEESTAT.bit.BUSY != 0);SmartEEPROM8 = 0x03;while (NVMCTRL->SEESTAT.bit.BUSY != 0);nvmUserCmd(NVMCTRL_CTRLB_CMD_SEEFLUSH);while (NVMCTRL->SEESTAT.bit.BUSY != 0);SmartEEPROM8 = 0x05;while (NVMCTRL->SEESTAT.bit.BUSY != 0);NVIC_SystemReset();}

author: ataradov
author_rank: Super Contributor
timestamp: April 08, 2022, 04:12:50 pm
content: Here is my advice - don't use SEE. It is bad on so many levels including completely opaque implementation. Just allocate flash and use NVMCTRL for writes. You will be in a full control of what happens.

author: crm
author_rank: Newbie
timestamp: April 08, 2022, 04:44:55 pm
content: Thanks Alex. That is what I'm going to do. I actually pretty much made my mind already a couple of months ago when I saw one of your posts. It is just that I still have a Microchip support case opened some time in Nov 2021 and I guess still looking for some sort of closure.
Power a TTGO with an 18650 shield? - Page 1
Forum section: electronics / general

author: Winfried
author_rank: Contributor
timestamp: March 25, 2022, 02:06:17 pm
content: Hello,I know nothing about electronics.I orderedthis 18650 shieldto power aLilygo TTGO controllerand get rid of the power bank I currently use.1. Can the TTGO actually be powered by this shield, and if yes, through which pin? The 5V pin?2. I then need to power a sensor, which requires 5V. As shown, the TTGO only has a single 5V output: Should I solder both the shield and the sensor to the 5V pin?Thank you.

author: mikerj
author_rank: Super Contributor
timestamp: March 25, 2022, 06:47:02 pm
content: You don't need the 18650 shield, the TTGO is designed to run directly from a single lithium ion cell using the connector on the bottom side of the PCB. Using this connector also means the cell gets charged (via a proper charger circuit) when you plug in a USB charger.That said you should be able to power the TTGO direct from the 5v pin, though stepping the cell up to 5v using that shield will reduce battery life.

author: thm_w
author_rank: Super Contributor
timestamp: March 25, 2022, 09:51:44 pm
content: If you don't want to do what mikerj suggests, can also:- Plug a USBC cable into the 18650 shield "USB 5V output"- Connect that to the TTGO USB input.- Solder your sensor to the 5V pin on the TTGO.

author: Winfried
author_rank: Contributor
timestamp: April 07, 2022, 02:06:43 pm
content: Thanks for the infos.
MCP4151 ROTARY ENCODER TO 256 STEP RESISTANCE - Page 1
Forum section: electronics / general

author: simon christo
author_rank: Regular Contributor
timestamp: April 17, 2022, 03:07:20 am
content: Hi there!!! I'm trying to control this chip with a 30 step Rotary Encoder, available from Jaycar directly, without a Microcontroller.There's nothing on the Net, about controlling it this way, if we can understand the codes nesessary on pin SDI/SDO (PIN 3, we may be able to work!!!I don't know 'C' language, maybe somebody else could help decifer it.Thanks Simon.

author: ledtester
author_rank: Super Contributor
timestamp: April 17, 2022, 04:04:26 am
content: The MCP4151 uses an SPI interface. You're going to need a microcontroller to control it.If you had a digital pot with a CLK and U/D pins you could interface it with a quadrature decoder chip/circuit like this:(from the 2003 EDN Design Ideas compilation available here:https://www.edn.com/design-ideas-pdf-collections-2001-2009/)Quote from: simon christo on April 17, 2022, 03:07:20 amThere are several Arduino libraries available for controlling the chip, e.g.:https://github.com/jmalloc/arduino-mcp4xxxso using the chip will be very easy once you learn some C and Arduino programming.

author: PCB.Wiz
author_rank: Super Contributor
timestamp: April 17, 2022, 04:34:54 am
content: Quote from: simon christo on April 17, 2022, 03:07:20 amI'm not following ?You say ' without a Microcontroller', but then you ask for C help. - C runs on a microcontroller.A problem with controlling a SPI digital pot with an incremental controller, is do you need to remember the last-wiper position, and continue from there ?If you want to control a digital pot, from Quad encoder, with minimal added bits, I'd suggest you drop SPI pots and instead select a UP/DOWN digital pot, as that is much closer to what an Encoder outputs.You will need to debounce/clean the Quad encoder signal, but from there you can connect the encoder to the pot, and get a change.Simplest is one step per full quad cycle, as that gives a natural CLK / DIRN, if you want one step per edge, you need a digital pot with a Quadrature Encoder interface- yes, they do make those/eg Seehttps://lsicsi.com/shop-products/digital-potentiometers/(or a tiny MCU that does Quad full cycle to CLK/DIRN on every edge, or some logic )If youreallyneed to use a SPI pot, you will need a MCU between your Quad Encoder and pot, to control that.Addit: and also parts that do quad to Dirn+Clk or Up_CLK & Dn_CLKhttps://lsicsi.com/products/ls7083n-s-ls7083n-ls7084n-s-ls7084n/
Direct GPIO mapping between SPP-C/HC-05 Bluetooth pairs - Page 1
Forum section: electronics / general

author: rubidium
author_rank: Regular Contributor
timestamp: April 06, 2022, 09:27:44 pm
content: Has anyone successfully taken a pair of those cheap SPP-C Bluetooth modules, configured one as a master and the other as a slave, and then reflect state changes in the master's GPIO pins as state changes in the slave's corresponding pins? All this with both Bluetooth modules operating stand-alone without microcontrollers - other than, of course, initially configuring each via respective connections to a serial terminal.Any help would be appreciated ...Jim
samX51  smarteeprom reading consecutively needs a pause between reads or not - Page 1
Forum section: electronics / general

author: snarkysparky
author_rank: Frequent Contributor
timestamp: April 05, 2022, 08:10:36 pm
content: I am storing 20 32 bit values in Seeprom starting at 0 adress.At boot up I want to load all these into a shadow array.Does this work?Code:unsigned int LoopVar = 0;for(LoopVar = 0; LoopVar < 20; LoopVar++){SmartEEpromMemoryShadow = *(unsigned int *)(SEEPROM_ADDR + 4 * LoopVar);}or do I need to pause in the loop forwhile (NVMCTRL->SEESTAT.bit.BUSY);Thanks

author: ataradov
author_rank: Super Contributor
timestamp: April 05, 2022, 08:30:30 pm
content: You need to wait for the BUSY flag before reads and writes.
Issues with ADC of SAML11 microcontroller ADC working - Page 1
Forum section: electronics / general

author: Rohit_S
author_rank: Newbie
timestamp: April 04, 2022, 06:42:01 pm
content: My device is SAML11E16A TQFPI want to detect AC current of 50 hz with the help of SAML11E16A microcontroller and send the digital values via USART terminal.I am configuring ADC as event system with event generator as timer0 counter and clock is set as 16Mhz for eveything.I want sampling frequency of 1khz so i am operating timer in MFRQ mode and in CC register i had put value of 16000 so (16000000/16000) = 1khzAnd as result is ready i am storing it in buffer and sending it via USART.The other gpio's like relay_control,etc are set as we have connected this board to relays and ADC is connected to current sensor and is getting values from it..I have attached my code as main_code.txtBut somehow this is not working .I have attached my code can you give look to it and help me out.I am feeling i have made some mistake in code only.It will be great help.The problem is ADC is not working properly and it is not going in handler function so "ready flag" is not set.If you want any other inputs feel free to write me.

author: ataradov
author_rank: Super Contributor
timestamp: April 04, 2022, 06:50:06 pm
content: Well, the most obvious thing that is incorrect is that you never disable the ADC interrupt when the buffer is full. And you set ADC_0_count = 0 at the same time you set ready = 1. So, ADC would continue to overwrite the buffer while you print the values.

author: Rohit_S
author_rank: Newbie
timestamp: April 04, 2022, 06:56:47 pm
content: But when I tried to debug it with breakpoint.The ready flag was never set so I am thinking is ADC doing conversion or not.I also want to know is my approach using timer is correct and are other things correctly configured.

author: ataradov
author_rank: Super Contributor
timestamp: April 04, 2022, 08:04:31 pm
content: Your timer configuration is strange. You are configuring it for 32-bit mode, and then using 8-bit mode registers for configuration. You are also enabling the NVIC interrupt but not enabling any interrupts in the timer and also not defining the handler.Things like this are debugged one step at a time - configure the timer and check that you get 1 kHz interrupts. And nothing else in the application.Then configure the ADC in a free running mode and see that you get conversions at a maximum rate. Then connect them with event sustem.But generally, I would not do this and just use whatever the closest sampling rate I can get using normal prescalers in the ADC and GCLK and let the ADC run in a free-running mode.
PIC Watchdog timer question - Page 1
Forum section: electronics / general

author: fubar.gr
author_rank: Unknown
timestamp: March 07, 2022, 12:19:09 pm
content: Hello, I am trying to figure out how the watchdog timer works on a PIC12F1571 in Proteus with XC8 compiler and came across a weird issue.I am setting WDTCONbits.WDTPS = 0b01110 which should change the WDT period to 16 seconds, but Proteus still says that the processor was reset after (the default) 2 seconds. I tried various values for WDTPS but I was still getting the default 2 second period, as if the WDTPS value is totally ignored.I tried various things, but what finally worked for me was to call CLRWDT() once, outside the main loop, then the watchdog timer reset would kick in at a time period according to WDTPS and work as intended.Is this documented somewhere?My full code is hereCode:#include <xc.h>#pragma config FOSC = INTOSC#define _XTAL_FREQ 2000000#pragma config WDTE = SWDTENvoid main(void) {OSCCONbits.IRCF = 0b1100;WDTCONbits.SWDTEN = 0b1;WDTCONbits.WDTPS = 0b01110;CLRWDT();TRISA = 0;LATA = 0;while(1){LATA = ~LATA;__delay_ms(1000);LATA = ~LATA;__delay_ms(1000);}return;}

author: Ian.M
author_rank: Super Contributor
timestamp: March 07, 2022, 01:22:17 pm
content: There are no silicon errata for the WDT, nor mention of needing to CLRWDT after changing the WDT prescaler, (though doing so before and after is advisable to prevent a shortened initial WDT period as there is nothing to indicate the WDT and prescaler are cleared when the prescaler setting is changed), so I would suspect a Proteus bug. Write test code (e.g. toggle a pin and SLEEP till WDT timeout) and try it on real hardware.

author: fubar.gr
author_rank: Unknown
timestamp: April 02, 2022, 11:07:33 am
content: Thanks!I tested it on real hardware and the WDT works as expected, so it was a Proteus bug

author: MikeK
author_rank: Super Contributor
timestamp: April 02, 2022, 07:38:32 pm
content: FYI: Your code above defines the xtal frequency as 2MHz...Did you mean 20MHz?

author: Ian.M
author_rank: Super Contributor
timestamp: April 02, 2022, 07:43:20 pm
content: Quote from: MikeK on April 02, 2022, 07:38:32 pmI'd bet *NO* as 20MHz isn't a supported INTOSC frequency, and his OSCCONbits.IRCF bits are correct for 2MHz.

author: MikeK
author_rank: Super Contributor
timestamp: April 02, 2022, 07:45:46 pm
content: Quote from: Ian.M on April 02, 2022, 07:43:20 pmSorry. My mistake for not realizing it was INTOSC.

author: Ian.M
author_rank: Super Contributor
timestamp: April 02, 2022, 07:49:29 pm
content: The odds would have been in your favor if our O.P. hadn't posted their full config and init code.For readability, it can be worth defining:Code:#define KHz *1000UL#define MHz *1000000ULso wherever frequencies are specified you can use S.I. multipliers, e.g:Code:#define _XTAL_FREQ 2 MHz