hybridfree/eevblog-posts huggingface dataset:
NXP ARM LPC1768 timer External Match Register and MAT0.n registers - Page 1
Forum section: electronics / general

author: perdrix
author_rank: Frequent Contributor
timestamp: August 01, 2023, 01:43:30 pm
content: I've been trying to make sense of the docs for the External Match Register (EMR) and the related MATn.m registers and I'm suffering from a total disconnectPlease could someone who knows explain to me in simple terms how this relates to GPIO pins and how you use them.ThanksDavid

author: nctnico
author_rank: Super Contributor
timestamp: August 04, 2023, 11:23:04 am
content: Emr is for the capture inputs. Mr (mat) is for internal counter match events.
Infineon 21002558 (SAF Xc161cj 16F20F BB) on GM instrument cluster - Page 1
Forum section: electronics / general

author: anton74
author_rank: Contributor
timestamp: July 31, 2023, 09:03:07 pm
content: Hello,I am trying to read the data from the MCU of the GM (2005 Chevy Trailblazer) instrument cluster board. The MCU is Infineon 21002558 which is actually the SAF Xc161cj 16F20F BB (I found this information in this video -). So, I am using MiniMon software and it seems like I can connect and read the MCU. I want to copy the entire firmware of the MCU in order to program another, blank MCU. What sectors should I select and how I can be sure that I copied all the necessary information?Thanks!
CH32V003 I2C  TX & RX  in RISCV assembly - Page 1
Forum section: electronics / general

author: Sajeev
author_rank: Contributor
timestamp: August 03, 2023, 08:58:13 pm
content: Dear Forum members,Please find attached CH32V003 I2C TX & RX demo in RISCV assembly. The code writes 6 characters to 0x0000 address of Fujitsu MB85RC256V FRAM and then reads it back.RegardsSajeev
MCF5407C3 (Coldfire): anyone? - Page 1
Forum section: electronics / general

author: DiTBho
author_rank: Super Contributor
timestamp: July 24, 2023, 03:16:20 pm
content: so, Today I saved 3 boards from being smashed in the hydraulic pressOne for me, two for my friends, they just need a cleaning, but they seem to be working.I can write the minimal support, but I see there is also a PCI connector near a big Cypress AN3042QC "CPU local bus PCI controller" (with shared ram!!!), near to a super delicious DM9008F, which is a 10-BaseT ethernet controller.Very nice stuffAnyone has ever worked with this board? Any kind of "board support package" around?If so, let me know!
Embeetle IDE free for all users, now supports Blue Pill and more... - Page 1
Forum section: electronics / general

author: Embeetle
author_rank: Newbie
timestamp: July 23, 2023, 03:34:51 pm
content: When it comes to microcontroller firmware development, the most complex and frustrating part is the configuration of the development environment. Indeed, multifunctional IDEs are powerful, but because of their complexity, it can take days - or even weeks - to make an LED blink with your microcontroller. They also add another layer of difficulty in reaching the full capabilities of the microcontroller hardware.But what if there is a free Free for all user, clean and efficient IDE that is tailor-made for the MCU that can boost productivity and unleashes the full capabilities of your MCU.The Embeetle team created a professional microcontroller IDE that is easy and intuitive for both inexperienced and seasoned developers. A new user typically only needs 10 minutes to start a new project and light up an LED with Embeetle IDE. Embeetle decreases mental overload and reduces overall operational costs.Over the past five years, Embeetle has partnered with Gigadevice, enhanced user experience and developed a visual debugger.Just recently, Embeetle IDE integrated the Blue Pill board. The STM32 Blue Pill is a 32-bit Arduino-compatible development board that features the STM32F103C8T6. A member of the STM32 family of ARM Cortex-M3 core microcontrollers. The STM32 Blue Pill board has nearly all the capabilities of the Arduino module but at a lower price.Check out Embeetle features athttps://www.embeetle.com/The Embeetle team also plans to collaborate with the best-value WCH MCU. While Embeetle would still like to maintain it free for all users, Embeetle is launching a Kickstarter campaign for WCH early access. After five years of R&D, the Embeetle team is running low on budget. At the same time, the Embeetle team would like to use this campaign to showcase to the MCU manufacturers so that Embeetle can be sponsored by manufacturers.https://www.kickstarter.com/projects/embeetle/embeetle-ide-integrating-wch-microcontroller-ch32v203https://www.kickstarter.com/projects/embeetle/embeetle-ide-integrating-wch-microcontroller-ch32v003As the Embeetle team grows, more and more MCU will be supported and we would love your precious advice and suggestions.Thank you for your support.

author: nctnico
author_rank: Super Contributor
timestamp: July 23, 2023, 08:12:37 pm
content: I don't understand how this works, let's roll my own...
[STM32F401] Can't init clock if gdb/SWD is connected and HSE is used - Page 1
Forum section: electronics / general

author: Jaunedeau
author_rank: Regular Contributor
timestamp: July 23, 2023, 05:34:17 pm
content: Ooops... I flashed again with after I tried running with USB, and no it is working... I really do't know what I did differently his time. Ignore this message until I find some more inormation(I could not delete it)Hi,I have a firmware that runs great.If I try try to debug it using an STLink V2 and openocd / gdb, the initialisation (generated with cubemx) timeout (HAL_RCC_OscConfig returns HAL_StatusTypeDef.HAL_TIMEOUTIf I switch to HSI instead of HSE + PLLCLK, it works fine with or without GDB. Lowering the clock did not change anything.I don't even know where to look from there :/ Any hint ?thanks,J.
CH32V003 USART TX in RISCV assembly - Page 1
Forum section: electronics / general

author: Sajeev
author_rank: Contributor
timestamp: July 23, 2023, 05:28:35 pm
content: Dear forum members,Please find attached CH32V003 USART transmit program in RISCV assembly assembled in BRONZEBEARD asembler. the code sends a string to console repeatably at 9600 baud. GET BRONZEBEARD assembler herehttps://github.com/theandrew168/bronzebeardregardsSajeev
CH32V003 interrupt worked - Page 1
Forum section: electronics / general

author: Sajeev
author_rank: Contributor
timestamp: July 23, 2023, 05:10:31 pm
content: Hi forum members,Greetings of the day!I am new to this forum and a hobbyist.I lost sleep last week trying to setup EXTI interrupt on CH32V003. Everything was very confusing and the reference manual doesnt describe things clearly. My interrupt would either get stuck inside the ISR or will never continue with the main program on return. After multiple attempts i found that enabling nesting and hardware stacking in CSR INTSYSCR 0x804 was causing all the issue. Its better to keep the CSR 0x804 untouched and perform a 15 register push and pop in the ISR. Then the program works fine. I tried EXTI0 from PD0 and also tried software triggered version of the same and found working. Please find attached the assembly program and header files. I assembled the program on BRONZEBEARD assembler and uploaded with WCHELINK. Posted here so someone may benefit. I dont know CRegardsSajeev
PShell on Raspberry Pi Pico (RP2040) - Page 1
Forum section: electronics / general

author: WillTurner
author_rank: Regular Contributor
timestamp: July 22, 2023, 07:31:36 am
content: Has anybody (else) yet had a play with PShell?This is a C compiler with vi and some simple commands running in a shell over a serial link.All on the RP2040, with access to the Pico SDK, and a small littlefs file system.Hence, "self-hosting" in the same kind of way that MMBasic can be on the Pico.The experience is very similar to the edit-run-debug cycle of Basic. Wow!This appeals to me because I can downclock the RP2040 to 48MHz. and it draws about 10mA. But I can develop code in-situ.https://github.com/lurk101/pshell

author: dobsonr741
author_rank: Frequent Contributor
timestamp: July 22, 2023, 08:15:02 am
content: Interesting. What appeals to you about using the console vs. hitting the run button in an IDE, like VS Code?

author: WillTurner
author_rank: Regular Contributor
timestamp: July 22, 2023, 11:24:00 am
content: Thanks for asking. That's what I'm trying to work out.Low power has a lot to do with it. And there is a huge nostalgic element. Add a dash of PDP-11 envy, and a desire to get down to the bare metal in a relatively painless way. Once the system is installed and running, many complications are eliminated - No toolchains, complicated development environments, heck, a dumb ASCII terminal allows me to get into the hardware with ... no laptop as a host. The feel of the thing is ... hard to describe.The idea of running Linux on RP2040 isn't really practical (Fuzix is part way there I suppose). So this is the next best minimalist kind of self hosting operating system. If RP2040 can be considered "embedded", then this environment would be like the leap from Basic in ROM systems to something like UCSD Pascal.I should mention a few shortcomings.No C pre-processor. No linker. One flat source file. But, access to the Pico SDK.LittleFS file system, small relative to Linux capable systems.At this stage, no SD Card support, or VFAT on a card. So upload/download of files using XModem.Anyway, if you are at all interested in this kind of thing, give it a whirl. If nothing else, it is a lot of fun.

author: tszaboo
author_rank: Super Contributor
timestamp: July 22, 2023, 11:28:06 am
content: Wait a minute. So it compiles the code for the Pico on the Pico?

author: WillTurner
author_rank: Regular Contributor
timestamp: July 22, 2023, 11:36:06 am
content: Yes, there is a stripped down shell with ls, cp, mv style commands, but especially a version of the vi editor. Create a source code file, then "cc srcfile.c" compiles and executes. Ctrl-C halts, and returns to the shell prompt. Documentation looks scant, but the source code for everything is there, and looks small enough to print out and peruse. (Read the source Luke). Kudos to the author(s)!
RISC-V CH32V003 - Page 1
Forum section: electronics / general

author: MathPi
author_rank: Newbie
timestamp: July 20, 2023, 09:22:13 pm
content: Hi All,I am just catching up on the cheap CH32V003 IC. JLCPCBcm/Parts seems to have some in stock now. My question is whether anyone has tried to program the IC via the usual UART instead of what WCH is promoting via their 1-wire link stick (I forget the name they gave it)? Couldn't one set up a USB-C to UART (say the old CH340C also by WCH) and program via TX/RX? If so, any details I should know before trying to do so..?Cheers,MathPi

author: DavidAlfa
author_rank: Super Contributor
timestamp: July 20, 2023, 10:41:51 pm
content: The PY32F002A is half the price (At least at lcsc), can be programmed through uart or SWD (J-Link, Openocd, PyOCD), tested it and was dead simple, also hasa lot more to offerthan the official specs.I will buy like 200 ($20) and proof my tinkering future for a long time.

author: MathPi
author_rank: Newbie
timestamp: July 20, 2023, 11:51:28 pm
content: That's a good IC too. Will look at the specs and compare them... As far as I understand the CH32V003 can be programmed via UART... just haven't found any tutorials on it.

author: thm_w
author_rank: Super Contributor
timestamp: July 21, 2023, 12:06:13 am
content: I asked to move to the correct section:https://www.eevblog.com/forum/microcontrollers/
Arduino IR - Page 1
Forum section: electronics / general

author: IvoS
author_rank: Frequent Contributor
timestamp: May 25, 2023, 07:07:22 pm
content: Hi, I have an Arduino project that I want to be able to use RC5 IR remote control with ATtiny84. I know there are Arduino IR libraries that support many IR protocols but I only need 3 buttons on my IR remote to be used for my audio project-power amp control. I can decode the HEX from the remote for each button. I am looking for simplest way possible to have the code written. Can it be done without libraries? What is the caveat? Thanks.

author: Jope
author_rank: Regular Contributor
timestamp: May 25, 2023, 07:59:42 pm
content: Quote from: IvoS on May 25, 2023, 07:07:22 pmWhy don't you want to use a library? The simplest way *is* to use a library. Not having to write it on your own is the whole point of libraries.

author: pqass
author_rank: Super Contributor
timestamp: May 25, 2023, 10:17:32 pm
content: Well, you could look at the library code to understand the protocol you're interested in.Then re-implement just the minimum necessary functions in your app.If you find that there's a lot to re-implement, then you should've used the whole library to begin with.

author: petersi123
author_rank: Newbie
timestamp: May 25, 2023, 11:07:31 pm
content: I made a Arduino remote a while back that was super simple with 3 buttons.I've added my code, maybe it can help you a little.Code:#include <IRremote.h>#define PanasonicAddress 0x4004#define PanasonicPower 0x0100BCBD#define PanasonicOK 0x01009293#define PanasonicAspect 0x01207B5AIRsend irsend;void setup(){pinMode(4, INPUT);pinMode(5, INPUT);pinMode(6, INPUT);}void loop(){if (digitalRead(5) == HIGH){irsend.sendPanasonic(PanasonicAddress,PanasonicOK);delay(1000);}if (digitalRead(4) == HIGH){irsend.sendPanasonic(PanasonicAddress,PanasonicAspect); // This should turn your TV on and offdelay(1000);}if (digitalRead(6) == HIGH){irsend.sendPanasonic(PanasonicAddress,PanasonicPower); // This should turn your TV on and offdelay(1000);}}

author: IvoS
author_rank: Frequent Contributor
timestamp: May 26, 2023, 10:14:09 pm
content: This will definitely help, thanks a lot.However, I will have to change to IRreceive. I do have IR remote that is RC5. I will find a way.

author: liaifat85
author_rank: Regular Contributor
timestamp: July 19, 2023, 07:21:03 am
content: The easiest way is to use the Arduino IRreceiver library which you don't want to. It is possible to use the RC5 protocol. Here somebody enquired about the same matter. You can check the links suggested in the answers.https://forum.arduino.cc/t/ir-receiver-without-library/580216/13And in case you need proteus library for IR, you can use this:https://www.theengineeringprojects.com/2018/07/infrared-sensor-library-for-proteus.html
Renesas 78K0R doesn't run without debugger connected - Page 1
Forum section: electronics / general

author: ian.rees
author_rank: Contributor
timestamp: July 18, 2023, 10:36:21 am
content: I've been poking around with a 78K0R in a piece of salvaged car hardware, via EZ-CUBE debug emulator and CS+ (in a Windows VM on a Linux host). It's been several years since I've had anything to do with micros that aren't ARMs, and CS+ is unfamiliar.I can program a simple firmware that blinks an LED, which seems to work using either the 78K0R's internal oscillator or an external XTAL (fIH or fX, based on the Code Generator GUI). Everything seems to work when CS+ has the debugger connected, and I'm fairly certain that the firmware is running out of flash (I can download stuff in to flash, turn everything off, reconnect with a different CS+ project and read out the original flash contents). The watchdog seems to function correctly. But, if I disconnect the debug probe from the board, the MCU stops and power cycling doesn't seem to run the firmware. With the EZ-CUBE disconnected, FLMD0 has a continuous signal with about 5ms off and 100ms on. It doesn't seem to make any difference whether pull up resistors on TOOL0 and TOOL1 (per the EZ-CUBE manual) are in circuit.Before I started with the LED blinking firmware, the board worked with the firmware that was in the micro (which I don't have a copy of), so I'm fairly confident that the board is fine.There must be a setting or something that I've got misconfigured, but I'm at a loss as to what it could be - just hoping someone might be able to point me in the right direction.Thanks!

author: ian.rees
author_rank: Contributor
timestamp: July 18, 2023, 11:11:30 am
content: Shortly after posting, I found that a pull-up resistor on FLMD0 makes the flailing stop after one cycle. So, FLMD0 seems to be related somehow.
Any openocd gurus? - Page 1
Forum section: electronics / general

author: nali
author_rank: Frequent Contributor
timestamp: July 12, 2023, 11:22:16 am
content: I'm trying to build/run openocd on a Beaglebone, using bitbanged gpio to program a nRF52832 by SWD.After pulling & building the latest source (0.12) I can't get it to accept my config for some reason.Here's the configurationCode:adapter driver linuxgpiodadapter gpio swdio 50adapter gpio swclk 60adapter gpio srst 51adapter srst delay 100adapter srst pulse_width 100and here's the outputCode:Open On-Chip Debugger 0.12.0+dev-00256-g4a9677617 (2023-07-12-08:57)Licensed under GNU GPL v2For bug reports, readhttp://openocd.org/doc/doxygen/bugs.htmlswdInfo : Listening on port 6666 for tcl connectionsInfo : Listening on port 4444 for telnet connectionsInfo : Linux GPIOD JTAG/SWD bitbang driverError: Require swclk and swdio gpio for SWD modeAs far as I can see by trawling the source code the error comes from sysfsgpio_swd_mode_possible() which in turn is just checking for non-negative values for swdio & swclk i.e. that they have been defined. So maybe I'm using the wrong method of defining the signals?Any ideas please? My Google-fu is failing me not help by the fact that gpio usage doesn't seem to be that common plus several options have been deprecated.

author: liaifat85
author_rank: Regular Contributor
timestamp: July 12, 2023, 03:51:57 pm
content: I think OpenOCD forum will be good for this question:https://openocd.org/pages/forum.html

author: nali
author_rank: Frequent Contributor
timestamp: July 12, 2023, 05:45:22 pm
content: That's sound adviceOdd the forum never came up in my searches (it's not mentioned on openocd.org)..Actually I just looked at it, it's locked with the most recent post in 2019. Ah well.

author: Faranight
author_rank: Unknown
timestamp: July 12, 2023, 06:50:17 pm
content: What about the OpenOCD IRC channel?https://openocd.org/pages/irc.html

author: nali
author_rank: Frequent Contributor
timestamp: July 13, 2023, 02:05:49 pm
content: OK so I got an answer on IRC...For the record, it was the actual GPIO definitions it wasn't liking although there was no error to indicate as such. The GPIOs are in banks of 32, so for example 50 is spec'd as 18 with "-chip 1" to indicate the 2nd bank.
Confusion about GD5F SPI Flash Memory - Page 1
Forum section: electronics / general

author: cheeseburger
author_rank: Contributor
timestamp: July 09, 2023, 10:09:49 pm
content: HelloI'm trying to use the GD5F1GQ4UBYIG SPI Flash. But I can't wrap my head about its memory layout.It features a Page size of 2048 Bytes (+ 128 Byte spare for I think ECC). The chip has 1024 Blocks with 64 Pages each. This results in 2048 Bytes * 64 Pages * 1024 Blocks = 134217728 Bytes -> 134MB. Why not 128MB? Even 134/1.024 -> 130MB.My next confusion is about the Page Read. The Page Read to Cache is documented on Page 16. It mentions a 24 Bit address. But 24 Bit from what? It reads pages. So it should be the address of the page. Is it just something like a multiplication of blocks and pages to get to this 24 Bit address?https://www.endrich.com/sixcms/media.php/2/DS-00242-GD5F1GQ4xBxIG-Rev1.pdfThe goal is to configure SPIFFS for this SPI Flash. For that I need values like this (This example is from a Winbond W25Q128FV):Code:spiffs_config cfg;cfg.phys_size = 16 * 1024 * 1024;cfg.phys_addr = 0;cfg.phys_erase_block = 4096;cfg.log_block_size = 4096;cfg.log_page_size = 256;

author: amyk
author_rank: Super Contributor
timestamp: July 09, 2023, 11:05:12 pm
content: NAND flash is always advertised by the size of the main area.The address is 24 bits but depending on the exact device, only a certain number of them are actually used; the higher bits are set to 0.

author: ArdWar
author_rank: Frequent Contributor
timestamp: July 10, 2023, 03:17:07 am
content: Quote from: cheeseburger on July 09, 2023, 10:09:49 pm134217728 BytesIS128MiB by the way. 227, a.k.a 128*1024*1024

author: cheeseburger
author_rank: Contributor
timestamp: July 10, 2023, 01:42:35 pm
content: Quote from: ArdWar on July 10, 2023, 03:17:07 amThanks, that explains my confusion. 134217728÷1.024÷1.024 = 128'000'000. I just divided one time by 1.024 and got confusedWhat would be a recommended Filesystem for this Chip? I think SPIFFS won't work as it is a NAND Flash. Is littleFS suitable for such a NAND Flash? Or would even FatFS be feasible as this NAND Flash seems to have a sort of ECC correction?

author: ejeffrey
author_rank: Super Contributor
timestamp: July 12, 2023, 02:43:16 am
content: Are you talking about operation in Linux or on a microcontroller or bare metal system?Generally I wouldn't use a filesystem at all on a spi flash device like this, but would work with the raw device, for instance storing data objects at pre-defined offsets or with a simple table of contents header. Examples of this would be storing an FPGA bitstream or an embedded system boot image. You can also store an archive used to initialize a ramfs.Jffs2 is a filesystem designed to work on these sorts of devices, it's the best choice I know of if you need read/write operation.FatFS is not a great option of you need a writeable filesystem as it doesn't do wear levelling. If you only need read only access it's probably fine.
NXP 4088 (or maybe LPC4357) Development board - Page 1
Forum section: electronics / general

author: perdrix
author_rank: Frequent Contributor
timestamp: July 07, 2023, 09:10:58 am
content: Hi folksI'm trying to find either the NXP OM13029,589 Development Kit for LPC4088 or the Embedded Artists EA-OEM-510 version of the same thingAt a pinch the LPC4357 variants would do.Does anyone have one of those lying around they no longer require?Many thanksDavid
ESP32: LEDC PWM or MCPWM when doing simple motor speed control? - Page 1
Forum section: electronics / general

author: roleroz
author_rank: Unknown
timestamp: July 02, 2023, 04:26:20 pm
content: Hi allI'm using an ESP32 to control a mecanum wheel chassis, and for that I need to control the speed of the 4 motors (each connected to one of the wheels). I'm using Toshiba's TC78H620FNG as an H-Bridge to control each motor (2 motors per IC), and 2 GPIO pins per motor (direction + enable). The plan is to have the direction (PHA_x) pin directly set with digitalWrite(), and use PWM on the enable pin to control speed. I have no feedback signal from the motorsI see that I have 2 ways of doing PWM in ESP32, and in case this is important I'm using the ESP32-S3, I can go with the LEDC PWM or the MCPWM modules:- The LEDC PWM module seems simpler to use, is the most widely used system out there to control motors, and according to the data sheet is used to control LEDs and "other uses", whatever that means- MCPWM is harder to use, and has fewer examples out there, but it's specifically designed to control motorsWhat would I be missing if I used LEDC PWM instead of MCPWM for this application?My motors are currently 6V 250mA, but I foresee them potentially growing up to 12V 1A in the future, but that is handled by the H-Bridge, not the ESP32. I do have separate power rails for motors and the electronics

author: ArdWar
author_rank: Frequent Contributor
timestamp: July 02, 2023, 05:10:20 pm
content: LEDC outputs a single PWM signal. You can use this if you use motor control IC with its own dead time generation.MCPWM outputs two (or more) PWM signal with matched phases, programmable dead time, etc. Use this if you want to directly control the switch timing of each MOSFET in a half bridge for example.

author: roleroz
author_rank: Unknown
timestamp: July 07, 2023, 07:39:41 am
content: It works, thanks
My custom ESP32-S3 data logger with RTC & Micro SD - Page 1
Forum section: electronics / general

author: Smartbeedesigns
author_rank: Contributor
timestamp: July 05, 2023, 05:20:12 pm
content: Hey all,Thought I'd share my ESP32-S3 data logger I designed and built. I spent a lot of time on it and several revisions to try and get the best data logging experience out of it.Here are some features.High precision RTC built in (DS3231).CR1220 RTC battery backup.Micro SD card slot for storing data. (supports up to 16gb micro sd cards).Deepsleep as low as 21uA.Dual 600ma LDOs for extra power headroom for powering external sensors.Dual stemma/qwiic connectors for easily attaching adafruit/sparfun sensor breakout boards.1S LiPo battery connector.LiPo battery charging circuitry.Battery on/off switch.LiPo battery voltage monitoring to track battery life.USB-C.USB detection circuitry.Open Source.Supports Arduino & Circuit Python with many example sketches.Breadboard friendly.Check out the GitHub for schematics/code/3D models and more.https://github.com/strid3r21/Bee-Data-Logger
How to connect reader with  PIC micro - Page 1
Forum section: electronics / general

author: Kittu20
author_rank: Regular Contributor
timestamp: June 30, 2023, 06:51:02 pm
content: I am getting confused seeing some information on internet so I want to connect em18 rfid reader to pic micro so my confusion is whether we can connect reader to micro directly or we need some interface like max rs2 32 rs485 Needed.

author: ozcar
author_rank: Frequent Contributor
timestamp: June 30, 2023, 10:05:11 pm
content: From what I can see, it looks like it depends on exactly what you have.The basic EM18 seems to be a square 32mm by 32mm module with 9 pins, one of which is a serial output pin ("TX"). Some sites call this output "RS232" but it is evident from the way these modules get used that the voltage on the TX pin is not at RS232 levels, but is determined by the EM18 supply voltage - usually specified as being from +4.5V to +5.5V, although I did see one lookalike where it said that it could operate down to +3.3V. The TX line from a module like that could connect directly to a MCU pin, (subject to 5V tolerance on the MCU pin if say the EM18 was running on 5V and the MCU on 3.3V).However, to confuse things a bit, you can also get the basic modules mounted on small PCBs with various additional components, in some cases including a MAX232-like voltage level converter. You would not connect the output of a chip like that directly to a MCU pin.
looking for a microccontroller for a pcb project can anyone help?? - Page 1
Forum section: electronics / general

author: ElectroNex
author_rank: Newbie
timestamp: May 26, 2023, 03:21:33 pm
content: im looking for an stm32 chip that can do 3 i2C connections, usb-c, 3 UART, 65 I/O's minimum and a 512kb program storage size, has to be suitable for new designs and smd

author: isometrik
author_rank: Regular Contributor
timestamp: May 26, 2023, 03:42:20 pm
content: https://www.st.com/en/development-tools/st-mcu-finder-pc.htmlorhttps://www.st.com/en/development-tools/stm32-finder.html?icmp=tt15133_gl_pron_apr2020

author: voltsandjolts
author_rank: Unknown
timestamp: May 26, 2023, 04:47:25 pm
content: Beware, this poster has previously started a very similar thread which got 6 replies, but OP didn't respond at all.https://www.eevblog.com/forum/beginners/what-microcontroller-should-i-use-365315/msg4709534/#msg4709534Prepare to be stonewalled if posting here

author: Doctorandus_P
author_rank: Super Contributor
timestamp: June 10, 2023, 02:52:04 pm
content: I recommend you buy a stm32 chip with at least 3 i2C connections, usb-c, 3 UART, 65 I/O's minimum and a 512kb program storage size, and suitable for new designs and smdAlso, what does "USB-C" have to do with your uC? It's just a mechanical connector, and it is supposed to be used with many different signalling protocols.

author: liaifat85
author_rank: Regular Contributor
timestamp: June 28, 2023, 12:05:35 pm
content: I think you can choose STM32F767. It has 4 I2C interfaces and 4 UARTS, 512KB SRAM. No. of I/O pin is also matching with what you want:https://www.st.com/resource/en/datasheet/stm32f765bi.pdfYou can make multi-channel data loggers like this with STM32F4 MCUs:https://www.pcbway.com/project/shareproject/10_channel_NTC_thermistor_based_temperature_logger_b1c5cdfe.htmlIf you use STM32F767 in such projects, it can more advanced.

author: Microdoser
author_rank: Frequent Contributor
timestamp: June 28, 2023, 12:32:35 pm
content: Quote from: voltsandjolts on May 26, 2023, 04:47:25 pmAnd they are only on their second post too

author: Infraviolet
author_rank: Super Contributor
timestamp: June 30, 2023, 09:55:34 pm
content: That huge number of IO pins could always be done using GPIO expander chips, or something like a shift register of the relevant type if you know certain pins will always be acting onlyas outputs or inputs.The i2c bus count could always be done by bit-banging software I2C on some pairs of pins, depending on your chips' clock rate the speed might not be as high as built-in I2C peripherals could be, but for many devices this slower speed won't be a problem. Same goes for UART if necessary.
Identifying unknown microcontroller - Page 1
Forum section: electronics / general

author: Bottersnike
author_rank: Newbie
timestamp: June 23, 2023, 09:15:25 pm
content: .

author: brucehoult
author_rank: Super Contributor
timestamp: June 24, 2023, 12:58:32 am
content: > The firmware is in Motorola SREC format, if that helps, though I don't recognise the machine code as anything I'm used to.You have the FIRMWARE? That should be the first thing you show us.

author: asis
author_rank: Frequent Contributor
timestamp: June 25, 2023, 01:18:27 am
content: Hi,Maybe it's "BQ" - then it is related to battery power or charge monitoring.This is from the BMS area and TI nomenclature.Look at the diagram again from this angle.

author: amyk
author_rank: Super Contributor
timestamp: June 25, 2023, 04:28:08 am
content: Quote from: brucehoult on June 24, 2023, 12:58:32 amThis. Unless you're under some sort of NDA that prevents you from doing so, give us all the information you know and we'll be able to help more.
GD32F303 - interrupts do not work when Stop low power mode is entered - Page 1
Forum section: electronics / general

author: vlado.valk
author_rank: Newbie
timestamp: June 07, 2023, 08:06:02 am
content: When GD32F303 enters STOP low power mode, external interrupt on pin PA0 or any other interrupt(SPI, Uart etc) do not work anddo not wake up the MCU

author: thm_w
author_rank: Super Contributor
timestamp: June 08, 2023, 10:55:54 pm
content: What is the code you used to enter STOP mode?SPI or UART won't be an option as a wake source, PA0 should work though.https://controllerstech.com/low-power-modes-in-stm32/

author: vlado.valk
author_rank: Newbie
timestamp: June 21, 2023, 12:29:47 pm
content: I use the standard firmware library and exit stop mode by external interrupt(Falling edge) on PA0, but MCU does not exit sleep

author: Psi
author_rank: Super Contributor
timestamp: June 21, 2023, 01:12:15 pm
content: are you sure you are entering sleep/stop mode with both the GPIO interrupt and global interrupts enabled?

author: thm_w
author_rank: Super Contributor
timestamp: June 21, 2023, 11:33:47 pm
content: Quote from: vlado.valk on June 21, 2023, 12:29:47 pmPost the actual code you are using to do that.
Is there a way to get access to unexposed pins of an ESP-32? - Page 1
Forum section: electronics / general

author: RAPo
author_rank: Super Contributor
timestamp: July 04, 2023, 06:49:37 am
content: I have an ESP32-cam board that is working fine.I need access to the two DACs but they are not exposed to a pin.Is there a way to get (reliable) access to these pins?

author: ArdWar
author_rank: Frequent Contributor
timestamp: July 04, 2023, 11:50:51 am
content: The two DAC pins are used internally by the camera module, so unfortunately no easy way to reuse them.

author: RAPo
author_rank: Super Contributor
timestamp: July 04, 2023, 04:47:28 pm
content: Thanks,That means going to use a separate ESP-32 and a separate OV6770.Quote from: ArdWar on July 04, 2023, 11:50:51 am
TM4C1294 Registration of the UART Interrupt Handler - Page 1
Forum section: electronics / general

author: MihayK
author_rank: Newbie
timestamp: June 19, 2023, 12:31:14 pm
content: I'm trying to make an interrupt handler by UART. Here is a link to the code I use:https://www.programmersought.com/article/9640953879/However, when initializing the UART, the controller freezes on registering the interrupt handler function:Code:UARTIntRegister(UART0_BASE, vUART0_IntHandler);(under the debugger, I checked the input to this function, the filling of the interrupt vector, but when exiting this function, the debugger does not go further. I even made a semaphore of LEDs to make sure that after this function, the controller stops further code execution) Moreover, the function vUART0_IntHandler - can be either filled or completely empty.I feel like I missed some detail.What is missing in the code?Who knows - please help!

author: westfw
author_rank: Super Contributor
timestamp: June 20, 2023, 08:24:44 am
content: Did you see this:Quote
CH32V003 TIM2 doesn't respond - Page 1
Forum section: electronics / general

author: rudyrock
author_rank: Newbie
timestamp: June 16, 2023, 12:01:49 pm
content: Hi, I have played with many microcontroller and recently try the CH32V003. It seem an awesome microcontroller for the price, but I have a weird issue for one particular case. I try to use the TIM2, but what ever I do, registers of TIM2 stay always to 0. No idea why and it is driving me nut!I am able to use the usart, tim1 as pwm on 3 led (RGB) and I was expecting to use TIM2 in is simplest form, but nothing that I do seem to work. I try to debug as well and change value in peripheral registers directly and they still stay always to zero for TIM2. I can change value for TIM1 easily.Is there somebody that can explain it to me what going on?

author: rhodges
author_rank: Frequent Contributor
timestamp: June 16, 2023, 12:18:10 pm
content: Check that the peripheral clock enable is set.Going from the datasheet:RCC_APB1PCENR |= TIM2EN;

author: rudyrock
author_rank: Newbie
timestamp: June 16, 2023, 12:26:19 pm
content: Thanks rhodges! Never tough that was so simple.
Raspberry PI PICO W- Bluetooth (in BETA) released in 1.5 version of SDK - Page 1
Forum section: electronics / general

author: djsb
author_rank: Super Contributor
timestamp: February 11, 2023, 02:34:02 pm
content: I got a notification this morning that version 1.5 of the SDK kit has been released. Bluetooth support is included, but it's at present in BETA.Hopefully soon there will be support in micropython. Maybe this thread can contain a log of any experience with the Bluetooth functionality. What do you all think?

author: SiliconWizard
author_rank: Super Contributor
timestamp: February 11, 2023, 08:35:24 pm
content: I thought BT was not usable on the PICO W due to the required bus of the RF SoC used not being connected to the RP2040? Or did I not remember right?

author: dobsonr741
author_rank: Frequent Contributor
timestamp: February 11, 2023, 08:43:31 pm
content: Works, per the release note:https://www.cnx-software.com/2023/02/11/raspberry-pi-pico-w-bluetooth-le-supportLack of commercial license seems to be a minor bump on the road.

author: tszaboo
author_rank: Super Contributor
timestamp: June 16, 2023, 08:25:27 am
content: They released the final version yesterday.https://www.raspberrypi.com/news/new-functionality-bluetooth-for-pico-w/One thing caught my eye in the press release:"Routing both Wi-Fi and Bluetooth traffic over the single three-pin SPI bus between RP2040 and CYW43439 has been a substantial engineering challenge."I'm wondering what that challenge was. I work regularly with wireless sensors, and I've seen people implement entire protocol stacks from scratch faster than the Pi foundation took to implement BLE, on a SoC that comes with it. Is it just the regular Infineon tax, where the MCUs from them don't work at all as advertized?
CH32V307 Evaluation Board RISC-V - Page 1
Forum section: electronics / general

author: badbyte
author_rank: Newbie
timestamp: June 08, 2023, 08:17:51 pm
content: Hi people,I have bought on aliexress an evaluation board for the CH32V307here.I have bought 2 of those and one showed up with the following lsusb output:Code:Bus 001 Device 012: ID 1a86:8010 QinHeng Electronics WCH-LinkAnd the other showed up in lsusb as follows:Code:Bus 001 Device 011: ID 4348:55e0 WinChipHeadThe second one doesn't respond to eclipse's queries at all, in the Configuration of the Download Configuration.From the output of lsusb I conclude that the firmware on the 2nd isn't the proper one.Can someone pointme to the right direction???

author: GromBeestje
author_rank: Frequent Contributor
timestamp: June 13, 2023, 09:23:01 pm
content: This looks to me like one of the boards gets into the debugger firmware, and the other baord is stuck in bootloader mode.WinChipHead has a Windows-only tool to configure and update their programmers, the dongles and the built-in EVB boards alike.Try the tool athttps://www.wch.cn/downloads/WCH-LinkUtility_ZIP.htmland see if it can configure the boards to RISCV debugger mode.
missing component  - Page 1
Forum section: electronics / general

author: Steps65
author_rank: Newbie
timestamp: July 02, 2023, 11:17:55 pm
content: There is a missing component on this board at the AVCC pin of the microcontroller XMEGA128A4U, I'm not sure if it is a capacitor or something else, can you please help me.Thanks

author: ataradov
author_rank: Super Contributor
timestamp: July 02, 2023, 11:56:49 pm
content: Check where the vias on the other side of the capacitor and that component go. There are two options:1. They are shorted and go to the ground, in that case the other via is a power supply and the missing component is a capacitor.2. Capacitor goes to the ground and the missing component goes to the power supply. In that case it is an inductor or a ferrite bead. In that case other via should go to other analog supply pins.Edit: clearly wrong option removed.

author: mengfei
author_rank: Regular Contributor
timestamp: July 03, 2023, 02:32:03 am
content: just like the above either a cap or inductor according to some circuits of the ATX128A4Uhttps://www.mikrocontroller.net/topic/353330https://www.elektroda.pl/rtvforum/topic2650441-30.html#12806588

author: Steps65
author_rank: Newbie
timestamp: July 03, 2023, 02:57:12 pm
content: Thanks, it's an inductor 10uH.

author: SiliconWizard
author_rank: Super Contributor
timestamp: July 03, 2023, 06:44:46 pm
content: Note that if it had been a capacitor, the MCU would still be working. While here, the missing inductor meant no power to AVCC, and then it probably didn't work that well.
PHY for USB3.0 - Page 1
Forum section: electronics / general

author: seyedsaeed
author_rank: Regular Contributor
timestamp: June 12, 2023, 10:44:01 am
content: HiI want make mass storage with USB3.0 and need flexible GPIO for type of storage.I found CYUSB301X.

author: eugene
author_rank: Frequent Contributor
timestamp: June 12, 2023, 06:18:17 pm
content: I needed to monitor an RTD and found MAX11201.
Blackpill with ARTERY AT32F403ACGU7 dev board - Page 1
Forum section: electronics / general

author: radiolistener
author_rank: Super Contributor
timestamp: June 10, 2023, 03:25:17 pm
content: Just found blackpill dev board on aliexpress with interesting MCU:https://www.aliexpress.com/item/1005004842376803.htmlWhen I found it I just thought that this is yet another STM32 variant which is supported by ST-LINKv2 and STM32 compiler tool chain.According to product description it has ADC and DAC, running at 240 MHz and has hardware accelerated floating point operations, one cycle hardware multiplier and other DSP things. This is very interesting...But before buying it I just decided to check it's datasheet, and noticed, that this is not STM32 but AT32 from Artery...I never deal with these Artery MCU, at a glance it looks like more fast STM32 clone with additional features and with more memory.But I'm not sure, does ST-LINKv2 and STM32 compiler tool chain supports it?Who tried it?

author: bingo600
author_rank: Super Contributor
timestamp: June 10, 2023, 05:59:21 pm
content: It's used in the LiteVNAhttp://www.kerrywong.com/2022/03/22/teardown-of-a-litevna-vector-network-analyzer//Bingo

author: PeterG
author_rank: Frequent Contributor
timestamp: June 10, 2023, 09:53:14 pm
content: Unfortunately the AT32F403ACGU7 is showing as Discontinued on LCSC.

author: Shonky
author_rank: Frequent Contributor
timestamp: June 10, 2023, 10:24:06 pm
content: AT32F403AVGT7 (LQFP100) version is used in the new Zoyi ZT-702S hand-held scope that Dave recently reviewed too.

author: mon2
author_rank: Frequent Contributor
timestamp: June 10, 2023, 11:57:30 pm
content: QuoteLCSC has a nasty habit of marking devices as discontinued when they are not - treat it as the same as they just do not carry the item on their portal. They have done this with assorted devices from WCH yet each is in production. Recommend that you reach out the sales team through the factory website for the true status of the device. In some cases, ask your local broker in Asia to ask on your behalf. We have had to do this with a few devices and PCB shops who appear to cater to their local Chinese (only) markets and respectively do not have an international sales group.

author: PeterG
author_rank: Frequent Contributor
timestamp: June 12, 2023, 03:10:29 am
content: Quote from: mon2 on June 10, 2023, 11:57:30 pmThanks for the heads up.
Simulating multiple components with MPLAB - Page 1
Forum section: electronics / general

author: newtekuser
author_rank: Frequent Contributor
timestamp: June 16, 2023, 03:46:56 am
content: Can MPLAB simulate a complete project, or just one component at a time? I.e.: my project consists of a PIC16 MCU driving a 16x2 LCD and a few buttons with which the menu is controlled on the LCD. I'd like to be able to simulate inputs from the buttons and see the menu output in the console.

author: woofy
author_rank: Frequent Contributor
timestamp: June 16, 2023, 07:19:36 am
content: Standard MPLABX only simulates Microchip's devices. There is MPLAB Mindi for analogue simulation but I've never used it.Labcenter's Proteus can do it, but that's a paid for program.
C handling strings \n cubeide - Page 1
Forum section: electronics / general

author: strawberry
author_rank: Super Contributor
timestamp: May 27, 2023, 10:04:45 am
content: "◙ \n"1:0x0A ASCII2:\n doent work because \ is escape char

author: DavidAlfa
author_rank: Super Contributor
timestamp: May 27, 2023, 11:30:09 am
content: What?

author: brucehoult
author_rank: Super Contributor
timestamp: May 27, 2023, 11:54:43 am
content: The escape character is thereexactlyso that you get 0xA instead of the normal 'n' = 0x6E.

author: DavidAlfa
author_rank: Super Contributor
timestamp: May 27, 2023, 12:06:50 pm
content: If you really want to show "◙ \n", then use "◙ \\n" , special characters need to be escaped.So \\ will print \. A single \ will escape the next char, but you already knew it!https://www.w3schools.com/c/c_strings_esc.phphttps://www.geeksforgeeks.org/escape-sequence-in-c/

author: strawberry
author_rank: Super Contributor
timestamp: May 27, 2023, 12:09:42 pm
content: for some reason scanning string doesn't return trueif (char == '\n')

author: brucehoult
author_rank: Super Contributor
timestamp: May 27, 2023, 12:41:21 pm
content: Quote from: strawberry on May 27, 2023, 12:09:42 pmIt would help if you showed a complete but minimal program.Compilers, as a rule, are not buggy, so with 99.99% probability what you are doing is not what you think you are doing.As a stupid example:Code:void foo(char char){if (char == '\n');{printf("char is a newline\n");}}

author: hans
author_rank: Super Contributor
timestamp: May 27, 2023, 01:00:48 pm
content: I would be cautious in mixing unicode with char in regular C code. Normally a string is a sequence of 'char' type, but in e.g. UTF8 encoding, one character can be 1 or more bytes long. Where only if a byte of a string is lower than 0x80, it means its a char from the standard ASCII set:https://en.wikipedia.org/wiki/UTF-8#EncodingE.g.:https://godbolt.org/z/671PKrzGeBut, there are many other types of unicode encoding sets. It depends on your text editor how the unicode characters are saved in the file.Also don't confuse char and strings. And maybe post a bit more because at present the question statement is a riddle.

author: DavidAlfa
author_rank: Super Contributor
timestamp: May 27, 2023, 02:59:29 pm
content: Better you start posting proper code instead few lose fragments!

author: Doctorandus_P
author_rank: Super Contributor
timestamp: June 10, 2023, 04:06:45 pm
content: Quote from: strawberry on May 27, 2023, 10:04:45 amIt would be nice if you added your intention or comprehension of what it is you suppose or want it to do.

author: DavidAlfa
author_rank: Super Contributor
timestamp: June 10, 2023, 07:16:14 pm
content: I very much doubt it's a compiler / IDE problem.You might have run into thinking it's ASCII, so 1 byte for each character, 4 bytes including termination.But that unicode string is written as { 0xE2, 0x97, 0x99, 0x20, 0x0A, 0x00}, so 6 bytes, char is the newline.Anyways there's no reason it wouldn't detect '\n'.This works as expected, finding it at char;Code:char msg[] = "◙ \n";uint8_t find_newline(char * s){uint8_t c=0;while(*s){if(*s++ == '\n')break;c++;}return c;}
The meaning of DAP w.r.t M3 arm processor  - Page 1
Forum section: electronics / general

author: Ario
author_rank: Regular Contributor
timestamp: June 08, 2023, 08:44:45 am
content: Hi Everybody,I need some assistance or basically an explanation. I am working on a project where some LPC1787 MCU are programming, and others not. It is probably a manufacturing issue. However I need to get to the bottom the issue.My question:In the IDE/debugger I use read the the following info from a debug log:Thu Jun 08, 2023 10:05:22: Firmware: J-Link Ultra V4 compiled Sep 22 2022 15:00:10Thu Jun 08, 2023 10:05:22: Selecting SWD as current target interface.Thu Jun 08, 2023 10:05:22: JTAG speed is fixed to: 8000 kHzThu Jun 08, 2023 10:05:22:Found SW-DP with ID 0x2BA01477Thu Jun 08, 2023 10:05:23:Failed to power up DAPThu Jun 08, 2023 10:05:24: Found SW-DP with ID 0x2BA01477Thu Jun 08, 2023 10:05:24: Failed to power up DAPWhat does DAP refer to and where can I read up more on its meaning ?Any help or guidance on where to find some answers would be appreciated greatly!!While googling I find people with similar issues, however no clear explanation regarding the meaning of "DAP" and "SW-DAP"Thanks in advance

author: janoc
author_rank: Super Contributor
timestamp: June 08, 2023, 09:06:35 am
content: DAP - "Debug Access Port".That's the part of the ARM core that actually allows you to debug the chip and also to program it.That error means that your chip is talking to the debugger over SWD but the DAP is not responding - e.g. could be disabled by some configuration/fuse to prevent reverse engineering. You may have to clear that first somehow, if it is possible on your chip.Or your programmer is not capable of programming that chip.https://developer.arm.com/documentation/102585/0000/what-is-a-debug-access-porthttps://developer.arm.com/documentation/102585/0000/Common-DAP-related-auto-detection-issuesThe other possibility is that your MCU is in JTAG and not SWD mode - this apparently depends on whether the /RESET is pulled low or high during the debug probe connection, according to the datasheet.

author: Jeroen3
author_rank: Super Contributor
timestamp: June 08, 2023, 09:40:27 am
content: Or there is already software inside that change the gpio modes of the SWD pins.

author: Ario
author_rank: Regular Contributor
timestamp: June 08, 2023, 01:13:31 pm
content: Hi,Thank you both, Jeroen, and Janoc. I can not believe I did not know what DAP stands for. :'(However you have put me on the right track, and I am 85% sure the combination of your suggestions led me to finding the issue. Thanks so much!As soon as I confirmed the issue properly I wil give feedback on what caused my issue.Spoiler: Read your Errata