PROVIDER - dual-core RP2040 with programmable I/O
Raspberry Pi Pico
Raspberry Pi Pico pairs the in-house RP2040 (dual Cortex-M0+ at 133MHz, 264KB SRAM) with PIO programmable I/O, official C/C++ SDK and MicroPython, and updates by dragging a .uf2 file; cheap and well documented, its limits are no built-in wireless and modest memory.
Detailed Notes
Pros 5 items
Cons 4 items
Service Overview
Raspberry Pi Pico launched in January 2021 around the in-house RP2040: dual ARM Cortex-M0+ cores at up to 133MHz, 264KB SRAM and 2MB of QSPI flash. Its signature feature is PIO, eight independent state machines that can implement custom timing protocols so the CPU no longer bit-bangs.
In the languages and frameworks category it stands for the modern low-cost microcontroller with complete documentation: an official C/C++ SDK on one side and MicroPython or CircuitPython on the other.
Key Strengths
- PIO programmable I/O: implement WS2812, DVI or custom serial protocols in a state machine while the CPU only moves data
- Dual-core parallelism: one M0+ handles acquisition while the other runs communications, synchronised with FIFOs and spin locks
- Two language routes: the C/C++ SDK for performance and determinism, MicroPython for rapid validation
- Frictionless flashing: hold BOOTSEL, power up, drag a .uf2 file
- Very low cost: chip and board prices undercut comparable parts, which matters for classrooms and fleets
Product Ecosystem
Chips and boards
RP2040 plus Pico, Pico W (Wi-Fi) and Pico 2 (RP2350), along with many third-party boards.
Software
The official pico-sdk with CMake projects and examples, the pico-vscode extension, and MicroPython or CircuitPython firmware.
Peripherals
2 UARTs, 2 SPI, 2 I2C, 16 PWM channels, 3 12-bit ADC channels and 8 PIO state machines.
Limitations
- No built-in wireless: pick Pico W for Wi-Fi or add a module and handle the protocol yourself
- Tight resources: 264KB SRAM must be budgeted carefully when running TLS and large buffers
- Sync is manual: the SDK provides primitives, but shared state design is up to you
- Young ecosystem: some drivers are community maintained, and rare peripherals require the datasheet
Use Cases
- Hardware teaching and labs (★★★★★): documented, easy to flash and cheap
- Custom timing protocols (★★★★★): PIO is rare among comparable MCUs
- Real-time acquisition and control (★★★★): dual cores plus deterministic interrupts
- Networked products (★★★): Pico W or an external radio is required
Pricing
| Item | Price | Notes |
|---|---|---|
| Pico boards | Per model | Small gap between base and wireless versions |
| pico-sdk | $0 | Official open-source SDK under BSD-3-Clause |
| MicroPython firmware | $0 | Open source and ready to flash |
Hardware is cheap; the investment is learning PIO and dual-core patterns.
FAQ
- What problem does PIO solve? It moves cycle-accurate bit manipulation into dedicated state machines, freeing the CPU from timing-critical work such as LED strips, custom buses and video output.
- C/C++ or MicroPython? Choose C/C++ for deterministic timing, low power and production firmware; MicroPython for validation and classroom demos.
- Can it do Wi-Fi? Use Pico W (CYW43439) or an external module; compare ESP-IDF and MicroPython under languages and frameworks for networked firmware.
Code Examples
C/C++ SDK blink with serial output
#include "pico/stdlib.h"
int main() {
const uint LED_PIN = PICO_DEFAULT_LED_PIN;
gpio_init(LED_PIN);
gpio_set_dir(LED_PIN, GPIO_OUT);
stdio_init_all();
while (true) {
gpio_put(LED_PIN, 1);
printf("on\n");
sleep_ms(500);
gpio_put(LED_PIN, 0);
printf("off\n");
sleep_ms(500);
}
}
With pico_sdk_init() wired into CMake, cmake --build produces the .uf2 image.
MicroPython: read the internal temperature sensor
from machine import ADC
import time
sensor = ADC(4) # RP2040 internal temperature channel
conversion = 3.3 / 65535
while True:
raw = sensor.read_u16() * conversion
celsius = 27 - (raw - 0.706) / 0.001721
print("chip temp: %.1f C" % celsius)
time.sleep(1)
The internal sensor is fine for trends; accurate measurement needs an external part.
Community & Resources
- Pico product page: specifications and availability
- GitHub raspberry-pi-pico topic: SDK examples and community projects
- GitHub MicroPython topic: scripted firmware and libraries
- MicroPython docs: RP2040 port details
- CircuitPython: education-oriented alternative firmware