5 ms·
The RP2040 is an example of a "microcontroller", a low-power processor with onboard program storage (typically Flash these days), and a bunch of handy periphera
by jpm_sd 4y ago
The RP2040 is an example of a "microcontroller", a low-power processor with onboard program storage (typically Flash these days), and a bunch of handy peripherals (UART, I2C, PWM etc.) in a single small package. This is a modern type with 32 bit ARM processor but microcontrollers have been used by the millions, for decades(!) in consumer products, automotive hardware, etc. Not too many 8 bit machines used by hobbyists today, but 8051 and PIC and AVR live on in numerous product lines.
The RP2040 is definitely not pioneering here. More of a well-marketed "me too" device IMHO.
FPGAs, on the other hand, have always been for specialized applications. High speed signal processing for imaging, sonar, or radar. Boundary-pushing network interface design. That kind of thing. They use a ton of power and developers are hard to find.
- vardump 4y agoI completely agree with what you said. However, there are applications where you just need high speed "bit banging", where you pretty much had to use an FPGA before. I meant to mention RP2040 as an example, since I was talking about it's PIO feature, not because other microcontrollers do not have similar features, but because it's the most well known. For example, RP2040 PIO is flexible and fast enough to run DVI/HDMI purely in software. Bit banging at 133 MHz (and even at 252 MHz overclocked, I'm sure there's no need for the do-not-use-in-production OC disclaimer). https://hackaday.com/2021/02/12/bitbanged-dvi-on-a-raspberry-pi-rp2040-microcontroller/ https://hackaday.com/2021/02/12/bitbanged-dvi-on-a-raspberry...
- packetlost 4y ago> The RP2040 is definitely not pioneering here. More of a well-marketed "me too" device IMHO Have you actually used one or looked at the datasheet? The 4 PIO state machines are pretty unique in the MCU ecosystem as far as I can tell. It makes "bitbanging" a completely acceptable approach for a huge number of protocols.
- jpm_sd 4y agoCompletely acceptable as a clever hack, or for real production designs?
- packetlost 4y agoIt's the explicit purpose of the submodule. It's like a microprocessor with fine-grained clockspeed control (fraction of the main CPU clock) and like 9 instructions that focus on driving GPIO pins. There's FIFO queues for pushing/pulling data from/to the PIO from/to the main CPU, so you don't have to waste any real clock cycles (other than to make sure your buffers aren't starved)
- vardump 4y ago> (fraction of the main CPU clock) Just watch out for aliasing jitter at higher fractions (frequencies). If that's going to be an issue, it's best to use integer fractions of the main CPU clock, if possible.
- packetlost 4y agoYeah, that's definitely a concern! The datasheets gives an example of serial communication and recommends using non-standard baud-rates to avoid this problem. It's not perfect, but my point was it's not just another MCU, there is actually some hardware that makes it somewhat unique. You can also adjust the system clock if you're desperate, though I'm not sure if that would entirely eliminate jitter (I haven't tried it)
- vardump 4y agoFPGAs definitely do have their place with their nice (fractional) PLLs and separate clock domains when it comes to applications like these.
- vardump 4y agoI'd say RP2040 PIO good for real production designs. Better documented and less surprises than many (most?) other microcontrollers. Haven't used it professionally, though, so caveat emptor.