Readit News logoReadit News
gadgetoid commented on I made a 10¢ MCU Talk   atomic14.com/2025/10/29/C... · Posted by u/iamflimflam1
NoiseBert69 · 2 months ago
These CH32 mikrocontrollers are great and dirt cheap. I've build a small DC motor controller with them to control a toy robot: https://github.com/h0lad/MiniSpeedController

The bigger ones have PHYs for USB HS, USB-C (5Gbps) and 10/100M Ethernet integrated (!). And their development environment (Mounriver Studio) isn't too bad - I didn't had the immediate urge to port everything to CMake/VSCode.

But they need some kind of pin planning tool. It's awful to use the datasheet and find the correct pin functionalities and their mutual exclusions... STM32 mastered this with their STM32CubeIDE tool: select a feature (like USART1) and the right pins light up - alternate pins are easy to locate.

They also should clean up their license mess on OpenWCH (their GitHub page). Lots (all?) of their HALs are Opensource - but the right version with right SPDX tags are often a bit hidden.

gadgetoid · 2 months ago
A pin planner- without the code gen of STM32Cube- would be doable as a website.

I made a basic one for the RP2350- https://rp2350b.pinout.xyz/

Though STM32Cube has a very different approach, handles lots of mutually exclusive features and peripherals and a bunch of extra stuff for controlling code gen IIRC.

gadgetoid commented on Show HN: Interactive pinout for the Raspberry Pi Pico 2   pico2.pinout.xyz... · Posted by u/gadgetoid
eternityforest · 5 months ago
This is really cool!

I especially love the ability to flip and reverse things, since I try to avoid comparing any two objects in different orientations, to cut down on mistakes.

It would be really cool if the community had a more general purpose open standard interactive diagramming tool for this sort of thing.

I guess the easy way would be to mark up photographs with pin locations, which would map to pins in a table, allowing for multiple tables in a document.

I'm not sure how you'd capture the data in a way that could be rendered to something like a screen reader or a more abstract diagram though, without a lot of complexity and edge cases.

Would it be enough to just verbally describe the mapping between pin numbers and the physical layout, as in "Across then down, starting at upper left", or would you need a meta data scheme for that?

gadgetoid · 5 months ago
I've thought about this on and off for years, trying to find a way to boil the stuff I've learned making Pinouts into some kind of tool.

There are a surprising number of pitfalls, since there's always some complexity most top-level diagrams don't reveal, but I feel is necessary to capture/avoid duplication of work- specifically, I mean documenting the pinout of the chip (RP2350, ATMEGA32U4, STM32H750, RP2 etc) and then translating that to a board layout.

I think the closest I've come is a prototype Pinout rewrite which started with chip [1] and board [2] JSON files.

Then, as you explore, there's the whole problem of presenting this information. I chose to capture information such as header type, orientation and pin-count but sometimes a header is too small (or there are too many headers) to document in-band so the kinda skeuomorphic presentation of the Pico pinouts doesn't work.

Perhaps that's where something like the minimap [3] from my "advanced" RP2350A pinout comes in.

Having a small representation of the board with the pin headers separate could work. It's been a while, IIRC a Fritzing [4] part involved creating a vector graphic of a part and naming the individual pin objects such that they could be mapped to a table of signals. I think SVG is compatible with this approach but... yeah, requiring people to create detailed board artwork (as good as it looks) is a stretch. The same could work for a good photo and just a table of offsets, as you suggest.

TLDR: This is a great idea and something I've wanted to do for ages. But I don't think I've got enough breadth of experience to do it alone.

1. https://github.com/pinout-xyz/pinout-2024/blob/main/chips/bc... 2. https://github.com/pinout-xyz/pinout-2024/blob/main/boards/r... 3. https://rp2350a.pinout.xyz

gadgetoid commented on Show HN: Interactive pinout for the Raspberry Pi Pico 2   pico2.pinout.xyz... · Posted by u/gadgetoid
transcriptase · 6 months ago
Incredible! Funny enough of all the dozen different Esp32 boards I’ve collected that’s the one I don’t have. If I ever have the time I may try to do some legwork for you for the c3 and c3-supermini if that would be helpful
gadgetoid · 6 months ago
Once I get the hand of the ESP’s idiosyncratic signal names (I don’t have much experience with them) I should be able to crank them out. But help would be appreciated, thanks - even a canonical list of the pins and functions would be super useful. I get the sense I’m missing something referencing only their pinout diagram.
gadgetoid commented on Show HN: Interactive pinout for the Raspberry Pi Pico 2   pico2.pinout.xyz... · Posted by u/gadgetoid
gadgetoid · 6 months ago
Thanks... urge to build a version for ESP32-C5-DevKitC-1 rising...
gadgetoid · 6 months ago
Nerd snipe successful.

(very beta website)

https://esp32c5.pinout.xyz

gadgetoid commented on Show HN: Interactive pinout for the Raspberry Pi Pico 2   pico2.pinout.xyz... · Posted by u/gadgetoid
coffeecoders · 6 months ago
This is great, I wish we had something similar for ESP and even Arduino. I have been following this [1] for the later.

[1] https://deepbluembedded.com/arduino-uno-pinout/

gadgetoid · 6 months ago
In typical fashion I got nerd-sniped into making an ESP32 C5 DevKit-1 pinout. I've disappeared down a hole of making the perfect SVG for the board art.

Will be an interesting experiment!

gadgetoid commented on Show HN: Interactive pinout for the Raspberry Pi Pico 2   pico2.pinout.xyz... · Posted by u/gadgetoid
transcriptase · 6 months ago
This is amazing, thank you! If anyone knows of something similar for any of the more popular Esp32 boards I would love to know about it!
gadgetoid · 6 months ago
Thanks... urge to build a version for ESP32-C5-DevKitC-1 rising...
gadgetoid commented on Show HN: Interactive pinout for the Raspberry Pi Pico 2   pico2.pinout.xyz... · Posted by u/gadgetoid
varispeed · 6 months ago
A suggestion. It would be nice if I click on e.g. "SPI0" it should highlight all pins related to SPI0.

Bonus points if it could generate example initialisation code for the selected pins on the fly or maybe even an example snippet of code to get the peripheral going.

gadgetoid · 6 months ago
Agreed. Click-to-select-related-pins is something I've been experimenting with on a cut-down Raspberry Pi Pinout [1]

And code gen is something I'm looking at with the RP2350A pinout [2] where the JSON export would allow someone to plug it into any tool they like. (KiCAD symbol gen, C/MicroPython init code, etc)

It's difficult to strike a balance between features/minimalism but I'm increasingly drawn to the idea of a full (STM32Cube-like if you're familiar with it) configurator for Pico/RP2 based boards.

1. https://pi.pinout.xyz 2. https://rp2350a.pinout.xyz

gadgetoid commented on Show HN: Interactive pinout for the Raspberry Pi Pico 2   pico2.pinout.xyz... · Posted by u/gadgetoid
bajsejohannes · 6 months ago
Thanks! I've been using pinout.xyz quite a few times; maybe you should link from there to the pico versions so it's easier to discover?
gadgetoid · 6 months ago
Agreed. Thanks!

I have definitely struggled with making the Pinout spinoffs discoverable- the OG site had ten plus years to bed in.

gadgetoid commented on Show HN: Interactive pinout for the Raspberry Pi Pico 2   pico2.pinout.xyz... · Posted by u/gadgetoid
Zanfa · 6 months ago
For inspiration, STM32Cube is otherwise PoS software, but it has a pretty decent utility for exactly this for most of their STM32 MCU lineup. Why they didn’t just make it a website is beyond me, but it is what it is.
gadgetoid · 6 months ago
I recently started building something like this for the RP2350A chip [1], deeply inspired by both STM32Cube and also by avoiding recreating the horror of STM32Cube.

I’m currently failing to not build STM32Cube for Pico though, the idea keeps gnawing away at me. There are some idiosyncrasies that my micro site doesn’t quite capture. Though perhaps it could.

1. https://news.ycombinator.com/item?id=44520091

gadgetoid commented on Show HN: Interactive pinout for the Raspberry Pi Pico 2   pico2.pinout.xyz... · Posted by u/gadgetoid
mrheosuper · 6 months ago
I wish many manufactures would begin adding Pin mux inside MCU, like espressif. So most of the time you don't care which pin has which function, and make designing pcb for it much less painful.
gadgetoid · 6 months ago
PIO kinda sorta does this but yeah the Pico could definitely benefit from a more flexible pin mux, since bringing up PIO peripherals is messy.

Pico never quite has a function where it’s needed.

u/gadgetoid

KarmaCake day524January 17, 2015View Original