hybridfree/eevblog-posts huggingface dataset:
Flash and debug a CH32V003 with only a Pico + GDB - Page 1
Forum section: electronics / general

author: tanjent
author_rank: Newbie
timestamp: April 26, 2023, 10:15:04 pm
content: Howdy, I've got some firmware for a Raspberry Pi Pico up and running that enables full GDB programming and debugging of a CH32V003 without any proprietary hardware or software (no WCH-Link, no modified OpenOCD).Give it a try here -https://github.com/aappleby/PicoRVD

author: brucehoult
author_rank: Super Contributor
timestamp: April 27, 2023, 02:39:16 am
content: Cool!Hello, Tanjent. Good work on reverse-engineering the protocol too.

author: gatk555
author_rank: Newbie
timestamp: April 29, 2023, 06:49:09 am
content: Nice. Have you thought about making the firmware "self-hosting" - a version that runs on the WCH32V003? Then in future it may be possible to buy a development board that is pre-flashed with this: a simple way into microcontroller development, similar to what can be done today with an Arduino board, and bare-chip Arduino "cores". The only Arduino part that is really needed is the ArduinoISP sketch for firmware flashing and afterwards that framework can be forgotten. Use of your firmware could be similar, but even less costly: 5-10X?

author: brucehoult
author_rank: Super Contributor
timestamp: April 29, 2023, 07:24:23 am
content: Quote from: gatk555 on April 29, 2023, 06:49:09 amCH32V003 doesn't have a USB interface so there's no way to use one to mediate between a host PC and a CH32V003 board to be programmed/debugged.

author: gatk555
author_rank: Newbie
timestamp: April 30, 2023, 07:24:16 am
content: I read the data sheet, but saw no need to go into much detail. USB/serial converters are widely used and very inexpensive, Or there is the more interesting possibility of bit-banging low-speed USB.

author: brucehoult
author_rank: Super Contributor
timestamp: April 30, 2023, 08:12:49 am
content: Quote from: gatk555 on April 30, 2023, 07:24:16 amTHE PI PICO IS BEING USED AS A USB/SERIAL CONVERTER.And protocol converter.A generic USB/serial converter won't work, you need WCH's special one. And you need a hacked OpenOCD too.This Pi Pico software is speaking WCH's custom 1-wire protocol on one side and standard OpenOCD on USB on the other side.That is the whole point here.
ELF .data section compression tool - Page 1
Forum section: electronics / general

author: abyrvalg
author_rank: Frequent Contributor
timestamp: April 28, 2023, 08:03:51 pm
content: I've coded a tool implementing a feature available for a long time in commercial ARM compilers (AC, IAR), but missing in GCC: build-time .data section compression and startup-time decompression.Normally, GCC .ld script contains directives placing entire initialized data section image into flash as is (with something like.data : { *(.data*) } > ram AT > flash) and startup code contains some form ofmemcpy(to_ram, from_flash, size). Sometimes this results in quite significant (if you are trying to squeeze the project into a cheaper part) flash image size grows. I.e. a careless declaration likeunsigned mydata = { 1 }would occupy 4K of flash to store a single 01 byte followed by 4095 zeroes to be copied to RAM. The tool attempts to compress the .data init image (trying several simple algos and selecting the most efficient one), appends a small decompression function and the compressed image. A modified startup code calls the decompressor outputting decompressed data into RAM.Perhaps someone will find it useful:https://github.com/flowswitch/elf-data-compress
Porting Config fuses from PIC32MX270F256D to PIC32MX795F512L - Page 1
Forum section: electronics / general

author: djsb
author_rank: Super Contributor
timestamp: April 22, 2023, 02:09:23 pm
content: I have downloaded some XC32 based PIC32 examples (I'm starting with 01_Blink.x files attached below) that use the PIC32MX270F256D. I've downloaded them from here.https://github.com/ArmstrongSubero/PIC32-ProjectsI'm using an Olimex PIC32-MAXI-WEB development boardhttps://www.olimex.com/Products/PIC/Development/PIC32-MAXI-WEB/Which uses a PIC32MX795F512L.https://www.microchip.com/en-us/product/PIC32MX795F512LI've managed to get one of the LED's on the board to blink using another example so the ICSP link works.I need to adapt the PIC32MX270_STD.C , PIC32MX270_STD.H, Delay.c and Delay.h files for use with an INTERNAL RC oscillator at 8 MHZ for example. Armstrong uses an external 4MHZ oscillator.There is also mention of a system register lock and unlock sequence as well as a few other parameters in the uc_init function hereCode:void uc_init(void){// system reg unlocksystemReg_Unlock();// configure oscillatorOSCCON = 0x80F3300;// system reg locksystemReg_Lock();// tune oscillator centre frequencyOSCTUN = 0x0;// configure referenceREFOCON = 0x100;// configure reference oscillator trim registerREFOTRIM = 0x0;}How many of these things do I really need to change for an initial switch and LED example to get me started? Thanks.

author: TomS_
author_rank: Frequent Contributor
timestamp: April 27, 2023, 07:26:32 am
content: Given that both devices are from the same family (PIC32MX) I would imagine there will be a lot of commonality between peripherals and what not.First place I would start would be to compare registers in the datasheets for each device to see if there are any breaking changes between them. Best case they are all identical and you dont need to make any changes. Worst case you might need to adapt some code a little.One thing to note is that the PIC32 series have "family reference manuals" for the peripherals because they are copy paste across all devices, meaning their registers and operation will be identical. So if I were a betting man I'd probably say there will be very few changes, potentially zero, just adjust for pin differences and recompile.
External crystal required for low speed USB on CH32V203? - Page 1
Forum section: electronics / general

author: eigenvektor
author_rank: Contributor
timestamp: April 25, 2023, 12:19:32 pm
content: Sorry if this is a noob question but I just wanted to make sure,the datasheet for the CH32V203 mentions a "Built-in factory-trimmed 8MHz RC oscillator" and a "Built-in PLL, optional CPU clock up to 144MHz", but no mention of tolerances. The datasheet also does not specify anything about crystalless USB.Do I need to an external crystal if I only plan on using low speed usb (HID input device keyboard)? I have attached the datasheet.

author: brucehoult
author_rank: Super Contributor
timestamp: April 25, 2023, 01:24:30 pm
content: USB low speed needs a clock accurate to 1.5%.According to table 4.3.6 the internal oscillator is accurate to within -1% to +1.6% between 0ºC and 70ºC.So it should be ok.Many devices take advantage of USB's 8b/10b encoding that guarantees a limited maximum time between level transitions to lock onto the USB clock by PLL or digital oversampling. IN that case you don't need a well calibrated clock at all. I didn't find any mention of this.

author: eigenvektor
author_rank: Contributor
timestamp: April 25, 2023, 01:27:56 pm
content: Ah yes you're right, I overlooked that. Thanks!

author: voltsandjolts
author_rank: Unknown
timestamp: April 25, 2023, 01:48:56 pm
content: If you want to avoid crystal for mechanical shock reasons, you could use a resonator for low speed.Quotehttps://www.beyondlogic.org/usbnutshell/usb2.shtml#DataSignallingRate

author: eigenvektor
author_rank: Contributor
timestamp: April 25, 2023, 01:51:32 pm
content: No just trying to save cost and board space, but I found ones for 10ct in 2x1.6mm so might throw on a crystal to be on the safe side.

author: newbrain
author_rank: Super Contributor
timestamp: April 25, 2023, 03:28:06 pm
content: Quote from: brucehoult on April 25, 2023, 01:24:30 pmThere's this in theRM, in chapter 21.1 Main Features of the USBD section:QuoteIt might be related to some kind of self synch, but I could not find much else.

author: eigenvektor
author_rank: Contributor
timestamp: April 25, 2023, 03:38:06 pm
content: Ouh that is actually very interesting information I was completely missing in the datasheet specific to the CH32V203, thank you very much :)I was wondering how come that one was so sparse of information.

author: eigenvektor
author_rank: Contributor
timestamp: April 25, 2023, 03:57:09 pm
content: From the reference manual (see attachment)There seems to be a "USB HS PLL" present providing 480 MHz, although I'm not knowledgeable enough to make any conclusions from that...Edit: this is actually for the CH32V305, for the CH32V203 see the second attachment. Reading is a useful skill sometimes.

author: brucehoult
author_rank: Super Contributor
timestamp: April 25, 2023, 11:12:19 pm
content: Knowing what to look for helps too.
The DSP PCB board arrived! - Page 1
Forum section: electronics / general

author: paulca
author_rank: Super Contributor
timestamp: March 13, 2023, 10:09:42 pm
content: Got my DSP "dev" board through from PCBWay today.One botch so far. A track swap.Fixed now and nicely hidden under the MCU.I've not tested the other two headers but the main optical in works and both DAC outs work. MCU is happy. 2 separate EQs, one per output, 5 peak bands each.It's a start. So much further to go on the software and UI side, but I couldn't stand it being on breadboards any more!Need to investigate a power supply filter for it. It's silent running on my Tenma bench supply but not while on a shared DC rail from a buck converter it isn't. Anyway, the power supply on this version was an after thought to take 5V instead of 3.3 and reg it down locally. Power supply design comes laterI'll get round to testing the other two headers tomorrow.

author: paulca
author_rank: Super Contributor
timestamp: March 13, 2023, 10:10:53 pm
content: I had all the toys out to play building it! Figured I might as well put the old monitor up on the scope. I'm actually hoping on putting it, or a smaller lighter screen on an arm so it can be in front of me.

author: paulca
author_rank: Super Contributor
timestamp: March 14, 2023, 12:14:39 pm
content: Would you believe I killed it. 10 hours maybe 12.Damn tenma power supply defaulted to 12.60V and 3 Amps and I hit "LOAD ON" before checking.Now. I installed a voltage regulator for the specific purposes of stopping that from happening. The board run on 5V and drops it to 3.3V itself with an AS1117.The AS1117 supports -20V to 20V, however mine came off a chinese regulator module for a breadboard. So it might not be a genuine instance.Well, whatever, now it only puts out 2.3V.At least it served a purpose. It took the 12V and cooked itself and not the rest of the board.It is now, once again, running fine just running off the STLink PSU until I swap that regulator out.

author: bobbydazzler
author_rank: Regular Contributor
timestamp: April 24, 2023, 11:11:20 am
content: If you use mlcc's for the 1117 you need to add some esr in the range of 0.1-10ohms to the mlcc. Inrush current can easily cause the mlcc to rise to 2x your input voltage if you have no esr.
XDS510 JTAG help needed for beginner - Page 1
Forum section: electronics / general

author: falcom
author_rank: Contributor
timestamp: April 17, 2023, 05:40:45 pm
content: I have a 1997 vintage circuit board that has a Texas Instruments TMS320 DSP, 80C51 microcontroller and 28F010 flash memory.I want to verify that all are working correctly and verify the flash memory programming.From the board manufacturer's documentation that I have the XDS510 will do this.I want to know if the commonly available XDS510 USB emulator/programmers on ebay will do what I want.Also what version of Code Composer would be correct for this?ThanksDave

author: mkissin
author_rank: Regular Contributor
timestamp: April 17, 2023, 09:35:34 pm
content: From the CCS download page:Support for XDS510 class probes was deprecated years ago for Linux and macOS. If you need to use one of these older probes please use CCSv8.3.1 or earlier.CCS v8 is ancient. The modern XDS110 probes will probably also work, but would need the full part number to check.

author: barshatriplee
author_rank: Regular Contributor
timestamp: April 20, 2023, 10:31:18 am
content: The XDS510 USB emulators/programmers available on eBay can work with the XDS510 emulation standard and should be compatible with your circuit board. However, it's important to ensure that the specific emulator you purchase supports the XDS510 standard and is compatible with the software tools you plan touse for programming and debugging. I am not sure which version of code compressor studio will solve your purpose. You can post your question to the TI forum.

author: RoGeorge
author_rank: Super Contributor
timestamp: April 20, 2023, 11:13:00 am
content: Just so you know, first versions of Code Composer Studio were not free. At some point TI decided to make CCS free (CCS was mostly Eclipse+GCC FOSS software anyway, customized for TI products), and released a license backward compatible with the former paid versions of CCS v4, v5 and v6 IIRC. The universal license, same as various versions of former CCS are all free to download from the TI software archives.So, if you find the version you need was not free, download and install it, then apply the free for all license that was released later (it's a filename called 'ccslicense.lic'). From their readme.txt:QuoteCouple of years ago, I had to use a TI DSP (from the C5000 family), and the newest I've installed was CCS 4.2.4.00033 under Windows XP, which was installed in a VirtualBox machine. Keep the VM offline, with the virtual LAN cable unplugged, and never update and never download anything from WinXP. Download with a recent OS first, then manually copy/paste into the virtual machine whatever installers you may need. That will avoid any security vulnerabilities a WinXP might have, and you won't need to install a WinXP antivirus either.I don't know about which programmer is supported, but once you have the VirualBox VM ready, you can clone the same WinXP install as many times as needed (WinXP is very small, something like 1-2GB, don't remember precisely) and install various CCS version in each clone, anew, and see what programmers they support.
Microchip Hi-tech vs XC8 Compiler - Page 1
Forum section: electronics / general

author: tarun172
author_rank: Regular Contributor
timestamp: April 19, 2023, 09:37:37 pm
content: Hi everyone,I'm attempting to port an existing Hi-tech compiler code base to XC8 compiler I have two questions,1. Can you still install and run the Hi-Tech compiler with the latest MPLAB X IDE? The Hi-Tech compiler does not install on my PC. I'm wondering if anyone has a workaround?2. Is there a migration document and information that exists that can help me migrate from Hi-Tech compiler to XC8?3. Reading through the manual, I can see that XC8 has a few limitations.Can anyone please comment on the questions above?Thanks,tarun172

author: woofy
author_rank: Frequent Contributor
timestamp: April 19, 2023, 10:12:24 pm
content: XC8 is the Hi-tech compiler, at least its what the hi-tech compiler evolved into after Microchip purchased Hi-tech. That said I very much doubt that it could be integrated into mplabx in any useful way. There may well be individual release documents as new features are added or changes made, but why would Microchip bother writing a migration document from that old compiler to the current release of XC8.You may have to just bite the bullet and update the code-base yourself.

author: JPortici
author_rank: Super Contributor
timestamp: April 20, 2023, 05:43:25 am
content: It can probably be added manually (menu tools -> embedded), but you need to use MPLABX <= v5.35, after that they moved to 64bit compilers only.If you use the current XC8 and put the compiler and linker in C90 mode you can probably live with little modifications, but the compiler has evolved as well, you will have to retest every part of the project.
how to program the 8051 board with CP2102 chip  - Page 1
Forum section: electronics / general

author: Kittu20
author_rank: Regular Contributor
timestamp: April 08, 2023, 11:32:40 am
content: I have 8051 development board and CP2102 module. I want to program the Sst89e516rd2 using the CP2102 chip because USB to rs232 converter is not working properly.I am supplying the 12 volt dc to the board. I have removed both jumpers on JP4 to disconnect MAX232 from MCU.I have done the following connection.CP2102's GND pin to the ground pin of ICSP.CP2102's TXD pin to the RXD pin P3. 0 of Sst89e516rd2CP2102's RXD pin to the TXD pin P3. 1 of Sst89e516rd2Link for boardhttps://www.amazon.in/Silicon-TechnoLabs-Development-P89V51RD2-SST89E516RD/dp/B014SIQ8SMCP2102 chiphttps://www.electronicscomp.com/cp2102-usb-to-ttl-serial-converter-module?gclid=CjwKCAjw_YShBhAiEiwAMomsEKRy8d8z_wQgqx1JWOjuWLwioaVUJfOj11zayzVe01c6Bzk8Ebf7zhoCmRcQAvD_BwE] https://www.electronicscomp.com/cp2102-usb-to-ttl-serial-converter-module?gclid=CjwKCAjw_YShBhAiEiwAMomsEKRy8d8z_wQgqx1JWOjuWLwioaVUJfOj11zayzVe01c6Bzk8Ebf7zhoCmRcQAvD_BwEI am following linkhttps://exploreembedded.com/wiki/Starter_SST89E516RD_USB_Development_boardWhen I try to program the controller I go to reset the switch phase but the microcontroller is not detected as given in the link Controller to be detected ?

author: PCB.Wiz
author_rank: Super Contributor
timestamp: April 11, 2023, 11:35:39 pm
content: Quote from: Kittu20 on April 08, 2023, 11:32:40 amAre you sure your Sst89e516rd2 has a bootloader programmed into it ?If you can find a parallel programmer, you may be able to read the DIP40 part, to check for the bootloader.You can also connect a scope to the TXD.RXD lines and check what comes from PC side, and what the MCU replies with.If the Sst89e516rd2 has no bootloader programmed, your choices would be toa) find parallel programmer and bootloader code and pgm itorb) choose a newer DIP40 with a bootloader includedeg lcsc has these in older 89C51 pinoutSTC89C516RD+40I-PDIP40 1+ US$1.696 131 In StockSTC12C5A60S2-35I-PDIP40 1+ US$1.7278 940 In Stockand this part is faster and newer and smarter, but not quite the same pinout.STC8H8K64U-45I-PDIP40 1+ US$1.5607 51 In Stockor, Aliexpress have MCU parts mounted with USB programming included for similar $https://www.aliexpress.com/item/1005004472730522.htmlhttps://www.aliexpress.com/item/1005004786538002.htmlhttps://www.aliexpress.com/item/1005004786339050.html

author: barshatriplee
author_rank: Regular Contributor
timestamp: April 13, 2023, 05:09:26 am
content: Make sure you have installed the correct USB driver for the CP2102 chip on your computer. You can download the driver from the manufacturer's website or the website of the vendor from whom you bought the CP2102 module.
Datasheet for AE08V8 - Page 1
Forum section: electronics / general

author: PhelarNord
author_rank: Newbie
timestamp: January 05, 2020, 01:08:12 pm
content: Hi!Looking for a datasheet regarding a AE08V8 chip. Seems hard find any infoAny body have a clue?

author: skennedy
author_rank: Contributor
timestamp: August 16, 2020, 04:05:31 am
content: I am also looking for this datasheet. I assume this IC is a microcontroller and seems to be available from a few Chinese sellers, but I'm yet to find a datasheet or anything resembling a description.

author: ajp8868
author_rank: Regular Contributor
timestamp: April 06, 2023, 12:54:53 pm
content: Sorry for bringing up an old post.. but did either of you have any luck? I'm in need of a replacement and can't find anything

author: barshatriplee
author_rank: Regular Contributor
timestamp: April 16, 2023, 02:42:29 am
content: Looks like the IC is no longer available. So is its datasheet.
Power saving and pc interrupts on ATMega324PA - Page 1
Forum section: electronics / general

author: glentek
author_rank: Regular Contributor
timestamp: April 24, 2023, 02:29:57 am
content: I have an ATMega324PA and I want to power down and only wake on CAN receive (working on int 0 successfully), on a schedule, on pcints on 6 digital inputs, and on serial receive - either serial0 or serial1.I have read Nick Gammon's forum post and have tried to adapt his code to my 324. It will go into sleep, wake on a digital input but then stays awake. I've obviously got something wrong. Also I'm not clear on how to wake on serial. This is some basic test code, the CAN code is not included. I'm using Arduino IDE.Code:/*ATMega324PA*/#include <avr/sleep.h> // Sleep Modes#include <avr/power.h> // Power management#include <avr/wdt.h> // Watchdog timerconst byte LED1 = 18; // pin DO1const byte DI1 = 28; // pin DI1 / PCINT4const byte DI2 = 29; // pin DI2 / PCINT5const byte DI3 = 30; // pin DI3 / PCINT6const byte DI4 = 31; // pin DI4 / PCINT7const byte DI5 = 22; // pin DI5 / PCINT22const byte DI6 = 23; // pin DI6 / PCINT23ISR(PCINT0_vect) {PCICR = 0;}ISR(PCINT1_vect) {PCICR = 0;}ISR(PCINT2_vect) {PCICR = 0;}// watchdog interruptISR(WDT_vect) {wdt_disable(); // disable watchdog} // end of WDT_vect// sleep bit patterns for WDTCSRenum {WDT_16_MS = 0b000000,WDT_32_MS = 0b000001,WDT_64_MS = 0b000010,WDT_128_MS = 0b000011,WDT_256_MS = 0b000100,WDT_512_MS = 0b000101,WDT_1_SEC = 0b000110,WDT_2_SEC = 0b000111,WDT_4_SEC = 0b100000,WDT_8_SEC = 0b100001,}; // end of WDT intervals enumvoid resetWatchdog() {// clear various "reset" flagsMCUSR = 0;// allow changes, disable reset, clear existing interruptWDTCSR = bit(WDCE) | bit(WDE) | bit(WDIF);// set interrupt mode and an interval (WDE must be changed from 1 to 0 here)WDTCSR = bit(WDIE) | WDT_8_SEC; // set WDIE, and 8 seconds delay// pat the dogwdt_reset();} // end of resetWatchdogvoid setup() {// disable JTAG for pins 18 to 21MCUCR |= (1 << JTD);MCUCR |= (1 << JTD);resetWatchdog(); // do this first in case WDT firespinMode(LED1, OUTPUT);pinMode(DI1, INPUT_PULLUP);pinMode(DI2, INPUT_PULLUP);pinMode(DI3, INPUT_PULLUP);pinMode(DI4, INPUT_PULLUP);pinMode(DI5, INPUT);pinMode(DI6, INPUT);// pin change interrupt masksPCMSK2 |= bit(PCINT22); // pin 22PCMSK2 |= bit(PCINT23); // pin 23PCMSK0 |= bit(PCINT4); // pin Din1PCMSK0 |= bit(PCINT5); // pin Din2PCMSK0 |= bit(PCINT6); // pin Din3PCMSK0 |= bit(PCINT7); // pin Din4// clear any outstanding interruptsPCIFR |= bit(PCIF0) | bit(PCIF1) | bit(PCIF2);// enable pin change interruptsPCICR |= bit(PCIE0) | bit(PCIE1) | bit(PCIE2);} // end of setupvoid loop() {digitalWrite(LED1, HIGH);delay(500);digitalWrite(LED1, LOW);delay(500);goToSleep();} // end of loopvoid goToSleep() {set_sleep_mode(SLEEP_MODE_PWR_DOWN);ADCSRA = 0; // turn off ADCpower_all_disable(); // power off ADC, Timer 0 and 1, serial interfacenoInterrupts(); // timed sequence coming upresetWatchdog(); // get watchdog readysleep_enable(); // ready to sleepinterrupts(); // interrupts are required nowsleep_cpu(); // sleepsleep_disable(); // precautionpower_all_enable(); // power everything back on} // end of goToSleep
Are MC9S08 3.3V microcontrollers 5V tolerant? - Page 1
Forum section: electronics / general

author: gashtaan
author_rank: Regular Contributor
timestamp: April 11, 2023, 05:55:46 pm
content: For example, in MC9S08GB60A MCU datasheet is power supply voltage range specified as 1.8-3.6V and for input high voltage there is no Max voltage specified. There is also comment that says "All functional non-supply pins are internally clamped to VSS and VDD.". Does it mean that it is safe to drive input I/O pin with 5V?

author: langwadt
author_rank: Super Contributor
timestamp: April 11, 2023, 06:16:08 pm
content: no, not without atleast a current limiting resistor, look at table A-1 and the notes under it

author: pgo
author_rank: Regular Contributor
timestamp: April 12, 2023, 03:10:32 am
content: Vih is not relevant to your question.It is the minimum voltage that the device will guarantee to accept as a high input logic level. It indicates nothing about electrically acceptable voltage range.Refer to the absolute maximum ratings.In particular Note 1.

author: floobydust
author_rank: Super Contributor
timestamp: April 12, 2023, 04:00:45 am
content: Note the injection current rating is quite low at 0.2mA so overdriving a pin using a resistor is not great. It's not a 5V anything MCU. 5-3.6V/0.2mA=7kΩ

author: gashtaan
author_rank: Regular Contributor
timestamp: April 12, 2023, 04:16:50 am
content: Ups, that was dumb of meI've completely missed the "Absolute Maximum Ratings" table. Thanks for the info.
STM32 CAN bus Bus-off recovery question - Page 1
Forum section: electronics / general

author: Red_Micro
author_rank: Regular Contributor
timestamp: April 12, 2023, 11:29:01 pm
content: Using STM32F4 as example, the reference manual says:QuoteSo my question is.. if there's already activity on the bus due to other nodes, will the bus-off node ever see those 11 consecutive recessive bits needed to synchronize to the bus?

author: langwadt
author_rank: Super Contributor
timestamp: April 13, 2023, 12:16:05 am
content: https://en.wikipedia.org/wiki/CAN_bus#Base_frame_formatACK delimiter, End-of-frame (EOF),Inter-frame spacing (IFS) adds up to eleven recessive bits
Socket pin header on Nucleo-144 "Morpho" connector? - Page 1
Forum section: electronics / general

author: gjvdheiden
author_rank: Contributor
timestamp: March 24, 2023, 08:21:17 am
content: I've bought a ST Nucleo-144 (Nucleo-F412ZG) board. The goal is to play with FSMC on a 16 bit parallel tft I've laying around for a long time. I also want to try out LTDC, as a next step. LTDC uses FSMC also, but for the RAM chip. Also nice.I'm drawing a little pcb, so I don't have to fiddle with all those wires, you know, trying to see if it is the loose wiring or the code.In an attempt to support Arduino or something, there's a limited standard pin header socket connector. Off course, by nature laws, not all pins I need are in this limited connector. I don't use Arduino, I use STM32 Cube IDE. I also like MBed os. So those Arduino pin names / mappings are not helping to say the least.My idea was to solder a header socket on the Nucleo board (CN1 and CN2) and snip off the long legs under the board. No doubt that will work, but any of you work with that board and how you practically work with that connector?

author: tooki
author_rank: Super Contributor
timestamp: April 02, 2023, 01:58:10 pm
content: What exactly is unclear?CN1 and CN2 are footprints for standard through-hole dual-row 0.1” headers. You can populate them with whatever you like: female, male, on the top, on the bottom, stackable…Are you talking about snipping off the legs of C7-C10?If you don’t want to modify the Nucleo board, you could of course just design your board so it goes underneath, and either connect to C7-C10 as well, or don’t, and just don’t put anything in the way. Then you’d just use headers to stack your board underneath.

author: SiliconWizard
author_rank: Super Contributor
timestamp: April 02, 2023, 08:33:28 pm
content: I don't know what the question is either.The pin-out of the connectors is documented in the user's guide. You don't even need to know or bother that it is supposed to be compatible with anything if you are designing your own PCB?

author: gjvdheiden
author_rank: Contributor
timestamp: April 06, 2023, 10:38:08 am
content: Yeah, my question is a bit unclear, sorry about that. The board comes with female sockets with the pins sticking out of the bottom, but they'll just going to bend. Sniped those off. Made a little "hat" like those Arduino shields, just like you mentioned tooki, but on the top. The hat or shield or adapter has a connector for a rotary and tft. That's just Potato tomato-w, if you're not using there board.I was just looking for someone who actually uses one of there boards (or similar) and how you practically use them. I just soldered 2 pin sockets (2x36) on the board. Removed the "feets" which are just pin headers and used some stand offs.Just looking for someone who might figured out or found something more fancy or flexible. But this will do just fine.
What does this IC do? - Page 1
Forum section: electronics / general

author: ThreeNamesGrace
author_rank: Newbie
timestamp: April 06, 2023, 05:47:54 pm
content: I found this IC in a spycam, I already searched it on Google and Bing but didn't find anything about it. I thing it is a microcontroller, but I don't know.

author: TomS_
author_rank: Frequent Contributor
timestamp: April 06, 2023, 09:34:07 pm
content: If it's the only (significant) chip, then it's probably some kind of SoC that runs the software of the camera, with interfaces for the camera sensor, microphone, and communication.Sometimes it's impossible to find information because they may be custom designed by the manufacturer of the camera, or just some really obscure part that doesn't really see the light of day from a design perspective outside of the country or region where the camera is designed.If nothing shows up in a search of various datasheet websites, I'd probably just cut my losses. You could end up spending a lot of time trying to track it down and never find it.

author: ThreeNamesGrace
author_rank: Newbie
timestamp: April 06, 2023, 09:37:13 pm
content: I wanted to "reverse engineer" the camera, but that chip ruined my plan. The spycam is Chinese, but I'm not willing to look for forums in Chinese.

author: pardo-bsso
author_rank: Frequent Contributor
timestamp: April 11, 2023, 01:09:49 am
content: If you can download a firmware image from the vendor, passing it to binwalk can tell you a lot about what that chip may be.
Stepper motor excessive current draw only on first idle - Page 1
Forum section: electronics / general

author: newtekuser
author_rank: Frequent Contributor
timestamp: April 01, 2023, 05:03:20 pm
content: My 5V stepper motor draws 650mA (driven by ULN darlington array) but only on first idle. I understand the draw is higher when idle, but in my case the draw drops to ~330mA after rotation and going back to idle.For some reason it only does that the first time after I power on the circuit. Any ideas as to why it's doing this?

author: langwadt
author_rank: Super Contributor
timestamp: April 01, 2023, 05:25:43 pm
content: how are you driving it?two coils on vs. one coil on?

author: newtekuser
author_rank: Frequent Contributor
timestamp: April 01, 2023, 05:54:44 pm
content: One coil energized at a time.

author: PeterG
author_rank: Frequent Contributor
timestamp: April 02, 2023, 01:04:19 am
content: Double check the state of the output pins on power up. Looks like your energizing both coils on power up.

author: newtekuser
author_rank: Frequent Contributor
timestamp: April 02, 2023, 05:47:16 am
content: Quote from: PeterG on April 02, 2023, 01:04:19 amThank you, that's what it was! I also made sure to set the port bits to low after performing any rotations.
ESP32 DCF77 transmitter DST issues - Page 1
Forum section: electronics / general

author: Miti
author_rank: Super Contributor
timestamp: March 26, 2023, 10:51:42 pm
content: Hi All,I made a DCF77 transmitter, link herehttps://www.eevblog.com/forum/rf-microwave/dcf77-transmitter/and everything works well except the DST which follows the EU DST and not the NA schedule. I can't figure out where is that defined in the code. I've attached the code, maybe someone can figure out.Cheers,Miti

author: CountChocula
author_rank: Unknown
timestamp: March 26, 2023, 11:54:11 pm
content: Howdy! The daylight savings triggers are set in theTZenvironment variable, which your code sets inNTP.inoat line 11, using the content of theTZ_INFOmacro, which is defined inDFC77_ESP32.ino. This string follows thePOSIX TZ formatto define the name of the timezone and its daylight savings counterpart, followed by a specification that tells the system when DST starts and ends.In your case, you have the following spec:AST4ADT,M3.5.0/02:00:00,M10.5.0/03:00:00This defines:A standard time timezone calledASTthat has an offset of 4 hoursbehindUTC. (that is, you have to add +4 hours to it in order to reach UTC)A daylight savings timezone calledADTthat has no offset (which is therefore assumed to be 1 hour) from standard timeDaylight savings starts at 2AM on the 0th day (Sunday) of the 5th week of the 3rd month of the year (March)Daylight savings ends at 3AM on the 0th day of the 5th week of the 10th month of the year (October)I'm not sure when you switch where you are, but you can just make the necessary adjustments and it should work. For example, here in Ontario we switch at 2AM on the 2nd Sunday of March, and switch back at 2AM on the 1st Sunday of November, so our string looks likeEST5EDT,M3.2.0,M11.1.0. If you're in Atlantic time, yours is probably very similar, i.e.AST4ADT,M3.2.0,M11.1.0Note that most UNIX systems also define a set of shorthand strings (such asAmerica/TorontoorAmerica/New_York) for convenience, but these aren't supported by the datetime system on the ESP32 (or, at least, they weren't the last time I checked).—CC

author: Miti
author_rank: Super Contributor
timestamp: March 27, 2023, 12:32:10 pm
content: Quote from: edavid on March 26, 2023, 11:43:54 pmIt is set to AST4ADT as I think the clock adds an hour. However, I don't want to change the code every spring and fall.

author: Miti
author_rank: Super Contributor
timestamp: March 27, 2023, 12:38:58 pm
content: Quote from: CountChocula on March 26, 2023, 11:54:11 pmThank you for a very clear and detailed explanation!I thought that the DST settings are in the TZ_INFO but then I got pulled on a false track, I found somewhere something about a "na_dst.h" or so file and I tried to find that file but I think that doesn't apply to ESP32 time library.Cheers,Miti
Anyone know this microcontroller RF60SC2 - Page 1
Forum section: electronics / general

author: Leo86
author_rank: Contributor
timestamp: November 05, 2020, 05:00:41 pm
content: Hi,I did not find the datasheet for this RF60SC2 microcontroller. Apparently the manufacturer is silicon labs.Does anyone know how to tell me more about this microcontroller?.thanks!

author: amyk
author_rank: Super Contributor
timestamp: November 06, 2020, 01:15:55 am
content: Definitely not Silabs,http://nz.apexelex.com/specs/rf_ics_ism_band/RF60.pdf

author: Leo86
author_rank: Contributor
timestamp: November 06, 2020, 12:10:26 pm
content: thanks

author: robzy
author_rank: Regular Contributor
timestamp: March 23, 2023, 10:26:44 am
content: I found this thread via Google, and for future searchers, the RF60SC2 is remarkably similar to the Si4010:https://www.silabs.com/documents/public/data-sheets/Si4010.pdf

author: barshatriplee
author_rank: Regular Contributor
timestamp: March 26, 2023, 02:36:52 pm
content: I just found some info here:https://forum.allaboutcircuits.com/threads/does-anyone-have-data-notes-for-rf60sc2.167740/

author: PCB.Wiz
author_rank: Super Contributor
timestamp: March 26, 2023, 10:58:56 pm
content: Quote from: Leo86 on November 05, 2020, 05:00:41 pmSee above. It looks like HopeRF doc, is tagged Si4010 in the PDFLooks like HopeRF makes modules, some using SiLabs silicon.https://s201.q4cdn.com/296366447/files/doc_news/archive/4f4f225e-2784-4821-aa53-7c1bf7321e2d.pdfSilicon Labs and Hope Microelectronics Join Forces on Sub-GHz Wireless Module Solutions
How to program PIC16F15214 with PICKIT2 - Page 1
Forum section: electronics / general

author: scopeman
author_rank: Frequent Contributor
timestamp: April 04, 2022, 02:46:52 am
content: Is there any open source software that can program the PIC16F15214 with the PICKit2?SamW3OHM

author: MikeK
author_rank: Super Contributor
timestamp: April 04, 2022, 02:56:45 am
content: Microchip has the source code for the PICKit2 and the standalone programmer application on their website. Tough to find, I think. You may have to search their forums for the link.

author: Ian.M
author_rank: Super Contributor
timestamp: April 04, 2022, 03:03:54 am
content: Probably not. However it is in Anobium's PICkitPlus device file:https://github.com/Anobium/PICKitPlusand if the programming algorithm is similar enough to any legacy PIC, then it *may* be usable with the PICkit 2 software v2.61.00 (standalone software), or PK2CMD, both of which Microchip released the source of. Contact Anobium to check if that chip is supported on a PICkit 2 with his paid software, or if it requires a PICkit 3.I preserved the PICkit 2 page contents and file links when they took it down back in 2014, in a Microchip forum threadhttps://www.microchip.com/forums/FindPost/775368

author: MarkF
author_rank: Super Contributor
timestamp: April 04, 2022, 09:59:00 am
content: Just buy one of the PICKit 3 clones. They can now be had for $20.Not worth the struggle to get the PICKit 2 working with newer MCUs.

author: jaka
author_rank: Contributor
timestamp: April 05, 2022, 03:40:31 pm
content: You can use PICkitminus, it's freehttp://kair.us/projects/pickitminus/index.html

author: nigelwright7557
author_rank: Frequent Contributor
timestamp: April 14, 2022, 09:10:20 am
content: Quote from: MarkF on April 04, 2022, 09:59:00 amGet one from a reputable dealer.I bought a cheapo Chinese one and it was very unreliable.So bought one from Farnell and its been great.

author: jaka
author_rank: Contributor
timestamp: April 14, 2022, 01:24:51 pm
content: Buying a PICkit3, genuine or clone, doesn't help you. Because PICkit3 doesn't support PIC16F15214 with Microchip official tools.You can program PIC16F15214 with PICkit2 and PICkit3 using either PICkitminus or PICkitplus. But if you want to debug or use official Microchip tools, you need PICkit4 or ICD4.

author: scopeman
author_rank: Frequent Contributor
timestamp: March 26, 2023, 04:09:00 am
content: Quote from: Ian.M on April 04, 2022, 03:03:54 amI ended up buying their product. And an excellent product it is, highly recommended.SamW3OHMScopeman
PICkit2 clone with reduced BOM - Page 1
Forum section: electronics / general

author: jaka
author_rank: Contributor
timestamp: March 24, 2023, 06:16:12 am
content: Hi all,I know that I am 15 years late to 'build your own PICkit2 clone' party, but here goes.I wanted to make a PICkit2 clone with reduced BOM. This doesn't mean minimal number of parts, but minimizing the number of different part types. Using PIC18F25K50 instead of PIC18F2550 allows getting rid of crystal and it's capacitors. I also eliminated all MOSFETs and diodes, they are replaced with common BJT types. Number of different part types was reduced from 33 to 20, without sacrificing any features.All the design files, Gerbers, and firmware including full source is available on my web sitehttp://kair.us/projects/pk2m_programmer/index.htmlToo complicated? Try the minimal version shown below. It is probably the simplest PICkit2 clone so far, which uses only 3 components. Note that it only supports LVP and has other limitations as well, so it is like 'PICkit2 SNAP' 😀

author: mariush
author_rank: Super Contributor
timestamp: March 24, 2023, 08:08:20 am
content: You could probably reduce it further with a bunch of 1k , 10k and 22 ohm resistor networks (arrays of independent resistors) ... the even the 4.7k resistors could be 2 10k resistors in parallelI wouldn't drop the separate crystal and its capacitors, seems like it would make it more flaky when it comes to usb.ex8 x 10k 2506 :https://www.digikey.com/en/products/detail/cts-resistor-products/742C163103JP/11243518 x 4k7 2506 :https://www.digikey.com/en/products/detail/cts-resistor-products/742C163472JP/11243368 x 10k 1506 :https://www.digikey.com/en/products/detail/panasonic-electronic-components/EXB-2HV103JV/2853318 x 1k 1506 :https://www.digikey.com/en/products/detail/panasonic-electronic-components/EXB-2HV220JV/2852998 x 22 1506 :https://www.digikey.com/en/products/detail/panasonic-electronic-components/EXB-2HV220JV/285299

author: jaka
author_rank: Contributor
timestamp: March 24, 2023, 08:40:20 am
content: Yes, combining resistor values using arrays is good idea. I have used that approach in some other projects. I especially like to use resistor arrays as feedback resistors for opamps, when minimal temperature drift is needed. Many resistor arrays have a specification for matching of temperature coefficient, so they cancel out nicely. This is cheaper than buying separate resistors with small PPM spec.Actually, my original target for reducing PICkit2 BOM was to allow easy integration to PCBA test systems. So I wanted to use parts which could be already on the tester BOM.Using crystal-less USB on PIC18F25K50 is not flaky. It has ACT (active clock tuning) which can sync to USB host clock. I have used it in several projects, including commercial ones, and it has been working without problems.
Cloning a BL2600 SBC beginner.. - Page 1
Forum section: electronics / general

author: magnetchief
author_rank: Contributor
timestamp: March 20, 2023, 07:17:58 pm
content: HiI'm looking for a little advice ref cloning a SBC.The device controls a cryo unit used in NMR.I purchased a new SBC and uploaded a bios file to it to replicate the original.This was installed and works fine apart from it was an earlier version so is missing some functions.This one photographed is the original with the updated software.I'd like to clone this and then update the software to the SBC now installed on our cryo bay.I'm fairly new to this and looking for advice on where to start.Many thanks

author: Gribo
author_rank: Frequent Contributor
timestamp: March 21, 2023, 03:57:31 pm
content: It looks like the SBC uses a parallel flash device. If you can hold the CPU in Hi-z Mode (reset usually does that), you can interface with the address/data bus and read the flash. Otherwise, you will have to take the flash out and read it in a programmer, hoping you didn't break anything.

author: abyrvalg
author_rank: Frequent Contributor
timestamp: March 21, 2023, 04:24:44 pm
content: I don’t see any parallel flash there yet. Both ISSI and Cypress parts are SRAMs.Could you post a better CPU (the one with rabbit logo. Is it a Rabbit 3000?) photo to see the marking?

author: magnetchief
author_rank: Contributor
timestamp: March 21, 2023, 06:31:28 pm
content: Thanks for the assistance.Photo attached.Yes 3000 by the looks of it

author: magnetchief
author_rank: Contributor
timestamp: March 21, 2023, 06:34:27 pm
content: I actually found details of this cloning board.Seems like it would be perfect for the job.Unfortunately it's no longer available.https://mans.io/files/viewer/307342/1Also found a program called extract_flash_c to be used with Dynamic C. Just have to figure out how to use it.
[help] Sequre sq-es126 bricked! stm32 controller! - Page 1
Forum section: electronics / general

author: phantom
author_rank: Contributor
timestamp: March 20, 2023, 11:59:24 pm
content: please help! i've bricked my screwdriver during upgrade of firmware...now it is totally dead....if i connect it to pc, it is not recognized (Device Descriptor Request Failed)the screwdriver has an stm32 controller...what can i do? thanks in advance
Lattice iCE40 Global Buffer placement question/error - Page 1
Forum section: electronics / general

author: thexeno
author_rank: Regular Contributor
timestamp: December 26, 2016, 05:34:33 pm
content: Hello,I am using the iCEstick with the iCE40 FPGA, with the ICECube2 tool + Synplify pro.I am getting a strange error in iCEcube2 when making the P&R, at the place stage:Code:Phase 4I2712: Tool unable to find location for GB clockFeeder.clkPrescSig_RNIJ0DC2_0Error during global Buffer placementThe error is related to a clock signal coming out from a prescaler and shared by multiple instances of my design. Apparently, it assign some global buffer option as reconize it to be a clock, and some how it does not know where to put the signal.If this signal is applied to only one instance, it works.Now, I was trying with Synplify Pro, since it is able to make all the chain, up to the P&R.Now I have two possible solutions:1. Counter measure this GB problem in iCECube22. Know why Synplify mess up with the pin assignment: seems to read another pin contraint file, different from the one created in ICECube2Help

author: julius123
author_rank: Newbie
timestamp: August 31, 2020, 03:59:08 pm
content: I can't believe it. After years and long after having sent emails to Lattice (I got really impertinent answers but no solutions) the GA (global assholes) of Lattice finally posted a workaround for this.It is here and it worked for me.http://www.latticesemi.com/en/Support/AnswerDatabase/5/7/1/5714For Details how to do it (suggestion 1) go to the Symplify pro reference manual athttps://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&ved=2ahUKEwjg3qvm38XrAhUQqpQKHTPBDg4QFjAAegQIARAB&url=https%3A%2F%2Fwww.microsemi.com%2Fdocument-portal%2Fdoc_download%2F136665-synopsys-fpga-synthesis-synplify-pro-me-l2016-09m-2-attribute-reference-manual-for-libero-soc-v11-8&usg=AOvVaw0QISnevxK3KmoiZcyJ5BcKand read sides 74 ff.A vhdl example is on side 77.That's all???My gosch, just stay away from Lattice.Julius

author: thexeno
author_rank: Regular Contributor
timestamp: November 05, 2020, 09:33:58 am
content: No way! Was worth the 4 years wait!Thanks!

author: hostile
author_rank: Contributor
timestamp: September 08, 2021, 10:42:41 pm
content: still useful information. Got stuck on this for a couple hoursand then a search led me to a dead thread on this great forum. thanks

author: Simply4638
author_rank: Newbie
timestamp: March 20, 2023, 09:53:09 am
content: For anyone having this problem:Solution seems to have the following link now:https://www.latticesemi.com/en/Support/AnswerDatabase/5/6/9/5699For sake of eternity:QuoteFirst approach did not solve for me. If you read in the synopsis manual above, it states: "If you specify an integer less than 6, the software infers six global buffers".You can also use "syn_noclockbuf" for individual signals.
32F4: How non-intrusive is the SWV ITM debug console? - Page 1
Forum section: electronics / general

author: peter-h
author_rank: Super Contributor
timestamp: March 17, 2023, 09:34:30 am
content: I've just had a really weird problem with this.I was never wholly reliable but I found that if I use it in a boot loader, some strange stuff was seen.AFAICT it is a primitive TX UART which is implemented in the CPU's SWV hardware, and the debugger implements an RX UART. In the Cube debug config you can set up the clock speed, which can be some MHz, so this method of debugging should not hold things up for too long.Code:/** Copied here from core_cm4.h.\brief ITM Send Character\details Transmits a character via the ITM channel 0, and\li Just returns when no debugger is connected that has booked the output.\li Is blocking when a debugger is connected, but the previous character sent has not been transmitted.\param  ch Character to transmit.*/static void ITM_SendChar_2 (uint32_t ch){if (((ITM->TCR & ITM_TCR_ITMENA_Msk) != 0UL) && /* ITM enabled */((ITM->TER & 1UL ) != 0UL) ) /* ITM Port #0 enabled */{while (ITM->PORT.u32 == 0UL){__NOP();}ITM->PORT.u8 = (uint8_t)ch;}return;}// This sends debug output to the SWV ITM / SWD debug interface{ITM_SendChar_2(ch);return ch;}// Function which sends data to the ITM debugger port. Works without needing any stdlib etc code, and// does not need interrupts. Fast output, megabits/sec.// Needs CRLF as appropriate.void debug_puts(char* str){int i=0;while (str!=0x00){ITM_SendChar_2((uint32_t) str);i++;}}Can anyone think of why?Iamrunning with a debugger connected but not necessarily in Debug mode.
Datasheet/info on this Led Badge microcontroller CH582M / 1091TC37 - Page 1
Forum section: electronics / general

author: BreenBoks
author_rank: Newbie
timestamp: March 26, 2023, 12:03:47 pm
content: Hi there,I bought this Bluetooth controlled B1144 Led Badge module and would like to get the datasheet or more info on the microcontroller used in it.Can't seem to find anything on the manufacturer (HDM?) or the IC: CH582M 1091TC37.Thank you

author: gamalot
author_rank: Super Contributor
timestamp: March 26, 2023, 12:37:09 pm
content: It comes from the famous Chinese semiconductor manufacturer WCH(南京沁恒), here is the datasheet but it's in Chinese.https://www.lcsc.com/product-detail/Microcontroller-Units-MCUs-MPUs-SOCs_WCH-Jiangsu-Qin-Heng-CH582M_C2920766.htmlhttps://www.wch.cn/products/categories/37.html?pid=63

author: BreenBoks
author_rank: Newbie
timestamp: March 26, 2023, 06:37:09 pm
content: Thanks!

author: zilp
author_rank: Frequent Contributor
timestamp: March 26, 2023, 08:42:18 pm
content: They generally do have English datasheets on their English website, in this case:http://www.wch-ic.com/downloads/CH583DS1_PDF.html

author: Sacodepatatas
author_rank: Regular Contributor
timestamp: March 26, 2023, 09:28:00 pm
content: There is a port of Arduino for the CH582 (but it's intended for the eval board).https://github.com/ElectronicCats/arduino-wch58x