Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

A microcontroller is a means to an end. When I need a CPU for an FPGA design, I will always use RISC-V because there's plenty of easy to integrate open source CPUs available. Similarly, when I need a hard microcontroller chip or board, I use whatever suits me best. And then I frankly don't care whether it's RISC-V or ARM. Why should I? I use what's available and has the right features.

There's nothing irrelevant about an RPI Pico: it has more RAM than most, it has excellent documentation and example code, it has PIOs that are incredibly versatile, it's available everywhere, and it's dirt cheap.

For quick prototyping I use MicroPython, otherwise I use C. Why should I have to learn Rust for something simple?



Do you have any recommendations on how to learn about PIO? I’ve mostly been in the arduino world and got pretty comfortable with AVR features, now I’m writing micropython to control neopixels for a board called the Plasma2040 and instead of bitbanging the signal from a digital pin, it’s apparently generating the signal via PIO, but it’s all black magic to me.


This is a blog post of someone converting a conventional bit-banged method of driving a display to pure PIO. Maybe it helps getting an idea?

https://www.zephray.me/post/rpi_pico_driving_el/


It is, at once, both over my head and very encouraging that someone who hasn’t used PIO before was able to achieve this, thanks for the link, I think if I compare this code to what the Plasma library is doing I might be able to tease out what’s happening.


Did you have a look at chapter 3 of the Raspberry Pi Pico C SDK already by the way? It's about PIO programming.

https://www.raspberrypi.com/documentation/microcontrollers/c...


I did not notice they wrote a whole book on the SDK, this looks perfect, thanks again


The C SDK contains examples, the actual documentation is in the RP2040 docs. It's also chapter 3.

https://www.raspberrypi.com/documentation/microcontrollers/


Chapter 3 of the RP2040 datasheet is all about PIO, but it may not be the best wy to learn: https://datasheets.raspberrypi.com/rp2040/rp2040-datasheet.p...

I find the Pico SDK examples useful to learn, but it requires that you already have a good understanding of the instructions and the protocol that it implements. Here's the I2C PIO program, for example: https://github.com/raspberrypi/pico-examples/blob/master/pio....


Hey I managed to miss that raspberrypi repo since I jumped straight into my neopixel project, many thanks




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: