4 ms·
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 C
by tverbeure 4y ago
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?
- jazzyjackson 4y agoDo 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.
- tverbeure 4y agoChapter 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.pdf 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/i2c/i2c.pio https://github.com/raspberrypi/pico-examples/blob/master/pio....
- jazzyjackson 4y agoHey I managed to miss that raspberrypi repo since I jumped straight into my neopixel project, many thanks
- _Microft 4y agoThis 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/ https://www.zephray.me/post/rpi_pico_driving_el/
- jazzyjackson 4y agoIt 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.
- _Microft 4y agoDid 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_sdk.html#raspberry-pi-pico-cc-sdk https://www.raspberrypi.com/documentation/microcontrollers/c...
- jazzyjackson 4y agoI did not notice they wrote a whole book on the SDK, this looks perfect, thanks again
- _Microft 4y agoThe C SDK contains examples, the actual documentation is in the RP2040 docs. It's also chapter 3. https://www.raspberrypi.com/documentation/microcontrollers/ https://www.raspberrypi.com/documentation/microcontrollers/