The Raspberry Pi Foundation's first microcontroller, the Raspberry Pi Pico is now on sale at $4. Raspberry Pi is normally associated with single board microcomputers. This microcontroller uses the RP2040 dual-core ARM Cortex-M0+ chip. The board has support for C, C++, and microPython.
We had three principal design goals for RP2040: high performance, particularly for integer workloads; flexible I/O, to allow us to talk to almost any external device; and of course, low cost, to eliminate barriers to entry. We ended up with an incredibly powerful little chip, cramming all this into a 7 × 7 mm QFN-56 package containing just two square millimetres of 40 nm silicon. RP2040 has:
- Dual-core Arm Cortex-M0+ @ 133MHz
- 264KB (remember kilobytes?[*]) of on-chip RAM
- Support for up to 16MB of off-chip Flash memory via dedicated QSPI bus
- DMA controller
- Interpolator and integer divider peripherals
- 30 GPIO pins, 4 of which can be used as analogue inputs
- 2 × UARTs, 2 × SPI controllers, and 2 × I2C controllers
- 16 × PWM channels
- 1 × USB 1.1 controller and PHY, with host and device support
- 8 × Raspberry Pi Programmable I/O (PIO) state machines
- USB mass-storage boot mode with UF2 support, for drag-and-drop programming
And this isn't just a powerful chip: it's designed to help you bring every last drop of that power to bear. With six independent banks of RAM, and a fully connected switch at the heart of its bus fabric, you can easily arrange for the cores and DMA engines to run in parallel without contention.
[*] By comparison, the Apple II computer (introduced in June 1977) had: 4-48 KiB of RAM, a 6502 processor (running at 1 MHz), and an Introductory price of US$1,298 (equivalent to $5,476 in 2019).
Additional coverage:
(Score: 5, Informative) by Rich on Friday January 22 2021, @01:17AM (10 children)
Already saw the news on a German forum and had a look at it. Here's the rundown:
I think it aims straight at the STM32 blue pill and ESP32 market. Pricewise it's just below "western" "pills", or even the STM32F103C8T6 chip itself, it can't compete with the Chinese offers on the 'bay, but these might well have the occasional re-labeled GD32F103C8T6 (not that the Gigadevices chip is something bad). The Pico packs a bit more oomph. The ESP32 offerings are even more performant, but with them it's a bit so-so with the Tensilica core, slightly wonky libraries and being not really mass-IO oriented. You'll still go with the STM32 when it comes down to low power stuff with a quartz clock, or the ESP32 when radio is needed.
I/O wise, the RP2040 is a bit meager, but it does have about double of each of the classic ATmega328 blocks. "Timers" are rather dumb, fixed to 1 MHz clock, but they're intended for software use only, and that looks acceptable with overall IRQ latency anyway. What's called "timer" elsewhere is in the PWM, of which there are 8 channels. Good for microstepping 4 motors - what's not to like. I don't really like how the RP2040 keeps wall time.
While the fixed IO looks rather sorry compared to the feature sets of today's competing microcontrollers, the RP2040 brings "PIO", programmable IO, which are little state machines that can run little (shall we say "pico"?) programs that are geared to enable the weirdest ways of precise bit-banging. They have examples for a triggered logic analyzer (to DMA), or VGA output. Looks very interesting, I look forward to what nifty things people come up with.
The PIO certainly bundle a lot of possibilities that's hardcoded with the competition and therefore all the complexity for the IO groups goes away, both in form of 1000-page manuals, and support library. The C one looks clean, lean and it builds with CMake (rather than forcing some Eclipse monstrosity on the developer). Good thing. Also, there is just ONE chip, compared to hundreds that come from ST. I'd assume that makes obsolescence much less of an issue. It's some QFN56 plus center ground pad, but if you want to solder, you can solder-in the whole Pico, which seems to be flat on the bottom with appropriate contacts.
Broadcom can be asshats at times, but if one can get along without them, I think the whole package is a good deal, especially if you plan to do fast but weird digital IO.
(Score: 2) by stormreaver on Friday January 22 2021, @01:53AM (2 children)
I started dipping my (very busy) toes into microcontrollers last year with the Arduino. How does attaching an accelerometer to a pico compare to doing the same thing with the Arduino? Easier, harder, about the same?
(Score: 2) by KilroySmith on Friday January 22 2021, @04:05AM (1 child)
This is brand-new, so hooking up an accelerometer will be more difficult. For the Arduino, it's as simple as ordering an Arduino-compatible accelerometer off Amazon, then using the provided libraries to read it. For the Pico, you'll have to figure out which pins to connect to the accelerometer, then you may need to write your own code to read the accelerometer. In a year or so, I'd expect the answer to change, and the two to be more-or-less equivalent.
(Score: 2) by stormreaver on Friday January 22 2021, @04:02PM
Thanks for the answer. I suspected that would be the case. It sounds like a whole ton of fun, if only I had the time.
(Score: 2) by takyon on Friday January 22 2021, @02:32AM
I saw this described as custom silicon designed by the Raspberry Pi team. Does Big Bad Broadcom even apply here?
Dual-core is not immediately useful but could become so.
[SIG] 10/28/2017: Soylent Upgrade v14 [soylentnews.org]
(Score: 2) by JoeMerchant on Friday January 22 2021, @02:02PM (5 children)
Or at least Star Raiders?
Україна досі не є частиною Росії Слава Україні🌻 https://news.stanford.edu/2023/02/17/will-russia-ukraine-war-end
(Score: 3, Interesting) by Rich on Friday January 22 2021, @09:21PM (4 children)
The Youtube algorithm just suggested a video "BBC Micro emulation on a $4 Raspberry Pi Pico" to me. Looks faithful. They show "Elite". Does that count in place of "Star Raiders" for now? I would bet that an Atari 8-bit emulation already is in the works somewhere, so Star Raiders might not be that far away.
(Score: 2) by JoeMerchant on Friday January 22 2021, @09:40PM (3 children)
The trick in Atari 8 bit emulation is the GTIA and sound chips - not that they're hard to emulate, just that they are rather specialized. In GTIA there's also the question: do you emulate the bugs that were in the majority of GTIA chips shipped, or do you emulate the design and later bug-fixed chips that shipped toward the end of the product run? I don't think there were many instances of the GTIA bugs being used to do intentional things. I know I designed a program to the documentation and it had a flicker-bug on the 800s & 400s that I couldn't explain (or fix) until the next gen 1200 computers came out with a fixed GTIA that my program worked perfectly on.
Україна досі не є частиною Росії Слава Україні🌻 https://news.stanford.edu/2023/02/17/will-russia-ukraine-war-end
(Score: 2) by Rich on Friday January 22 2021, @10:54PM (2 children)
Without looking, I would assume that MESS has all that figured out and in code comments. The interesting "new" task would be to get the Pico's PIO to precisely output the original video signal. Or, for Apple II or Mac emulation emulate the Wozmachine, so you can directly hook up the floppy mechanisms. Or, because these cause hassle, have another pico that emulates the floppy mechanism, too, with fast SD card backend storage on the quad SPI. Or, for the C64 do the SID with an external analog filter. If you bring enough time, the nerd fun can be endless. :)
(Score: 2) by Rich on Friday January 22 2021, @11:08PM
Replying to myself here, because I just thought of one more useful retro project (as useful as retro stuff is, anyway): Have an interface that picks up all sort of vintage video signals from original devices and translates it to "modern" digital video, or at least VGA, because this is what many monitors still understand. Chances are that the original monitor just crapped out when you want to try that original (or originally emulated) vintage gear. Bonus points for a knob that dials in vintage TV artifacts. (But spare us the 50 Hz flicker of PAL!)
(Score: 2) by JoeMerchant on Saturday January 23 2021, @04:20AM
But who has an analog television to use as a monitor anymore?
I know the rubber belts in all my floppy drives disintegrated 10+ years ago.
Much better to emulate to an HDMI out and SD storage.
Україна досі не є частиною Росії Слава Україні🌻 https://news.stanford.edu/2023/02/17/will-russia-ukraine-war-end