Home / Learn Chip Programming / RP2040 and Raspberry Pi Pico
RP2040 and Raspberry Pi Pico
Dual Cortex-M0+ at 133 MHz, 264 KB RAM and PIO for under Rs 400.
Theory in plain words
What it is
RP2040 has two Cortex-M0+ cores, 264 KB SRAM in 6 banks, USB 1.1, 2 UART, 2 SPI, 2 I2C, 16 PWM, 12 bit ADC and 8 PIO state machines. Flash is external QSPI. RP2350 adds Cortex-M33/RISC-V and security.
Why we use it
Great documentation, a UF2 drag-and-drop bootloader burned into ROM and the unique PIO make it perfect for learners and custom interfaces.
How it works
Hold BOOTSEL while plugging USB: it mounts as a drive; drop a .uf2 file. SDKs: C/C++ Pico SDK, MicroPython, CircuitPython, Arduino-Pico.
Where it is used
- Raspberry Pi Pico / Pico W
- USB devices, displays, LED matrices
- Custom protocols with PIO
Pico vs others
Pico is the best value for learning embedded C and PIO; ESP32 when you need radio; Uno for the simplest start.
#include "pico/stdlib.h"
int main() {
const uint LED = 25; // Pico W uses the CYW43 chip: cyw43_arch_gpio_put(CYW43_WL_GPIO_LED_PIN, 1)
gpio_init(LED); gpio_set_dir(LED, GPIO_OUT);
while (true) { gpio_put(LED, 1); sleep_ms(500); gpio_put(LED, 0); sleep_ms(500); }
}
// build: mkdir build && cd build && cmake .. && make -> blink.uf2: hold BOOTSEL, plug in, drag the fileQuick quiz
1. How do you load firmware on a Pico?
It appears as a USB drive.
2. Number of PIO state machines on RP2040?
Two PIO blocks with four state machines each.
Common questions
How do you load firmware on a Pico?
Hold BOOTSEL and copy a .uf2 file. It appears as a USB drive.
Number of PIO state machines on RP2040?
8. Two PIO blocks with four state machines each.