Raspberry Pi Pico (RP2040)

The Raspberry Pi Pico is a high-performance, low-cost microcontroller board built on the RP2040 chip designed by Raspberry Pi.

Raspberry Pi Pico

At a glance

Pins and properties exactly as the circuit editor and simulator define this part. The text below explains how to use them.

Board facts

Board facts
FactValue
Operating voltage3.3 V
FamilyRaspberry Pi
Python runtimemicropython
Wi-FiNo
BluetoothNo
Native USBYes

Pinout

Pinout of the Raspberry Pi Pico. Select a label to see that pin in the table below.

The Raspberry Pi Pico is a high-performance, low-cost microcontroller board built on the RP2040 chip designed by Raspberry Pi.


1. Hardware Specifications

  • Processor: Dual-core ARM Cortex-M0+ running at a flexible clock speed up to 133 MHz.
  • Logic Level: 3.3V. All pins operate on 3.3V logic.
  • Memory Limits: 2 MB Flash memory, 264 KB SRAM (partitioned into 6 independent banks).
  • Native USB: Native Micro-USB connector supporting USB 1.1 Host/Device.

2. Detailed Pinout & GPIO Map

Real RP2040 silicon has a flexible GPIO function-select matrix (any of several UART/I2C/SPI peripherals can be routed to many different pins) — but OMS's simulator only implements one fixed default assignment per bus, not the full remappable matrix. The table below reflects what's actually usable in OMS, not the full chip datasheet's alternate-function table:

Pins of this board
PinKindFeaturesAlternate functionsNotes
GP0GPIOPWMPWM, SDA, I2C, TX0, UART0Default UART0 transmit.
GP1GPIOPWMPWM, SCL, I2C, RX0, UART0Default UART0 receive.
GNDGround
GP2GPIOPWMPWM, SDA, I2CPlain GPIO in OMS — no bus function modeled on these pins.
GP3GPIOPWMPWM, SCL, I2CPlain GPIO in OMS — no bus function modeled on these pins.
GP4GPIOPWMPWM, SDA, I2C, TX1, UART1Default I2C data pin and default UART1 transmit.
GP5GPIOPWMPWM, SCL, I2C, RX1, UART1Default I2C clock pin and default UART1 receive.
GNDGround
GP6GPIOPWMPWM, SDA, I2CPlain GPIO in OMS — no bus function modeled on these pins.
GP7GPIOPWMPWM, SCL, I2CPlain GPIO in OMS — no bus function modeled on these pins.
GP8GPIOPWMPWM, SDA, I2CPlain GPIO in OMS — no bus function modeled on these pins.
GP9GPIOPWMPWM, SCL, I2CPlain GPIO in OMS — no bus function modeled on these pins.
GNDGround
GP10GPIOPWMPWM, SDA, I2CPlain GPIO in OMS — no bus function modeled on these pins.
GP11GPIOPWMPWM, SCL, I2CPlain GPIO in OMS — no bus function modeled on these pins.
GP12GPIOPWMPWM, SDA, I2CPlain GPIO in OMS — no bus function modeled on these pins.
GP13GPIOPWMPWM, SCL, I2CPlain GPIO in OMS — no bus function modeled on these pins.
GNDGround
GP14GPIOPWMPWM, SDA, I2CPlain GPIO in OMS — no bus function modeled on these pins.
GP15GPIOPWMPWM, SCL, I2CPlain GPIO in OMS — no bus function modeled on these pins.
GP16GPIOPWMPWM, SDA, I2C, MISO, SPIDefault SPI Master In Slave Out pin.
GP17GPIOPWMPWM, SCL, I2C, CS, SPIDefault SPI Chip Select pin.
GNDGround
GP18GPIOPWMPWM, SDA, I2C, SCK, SPIDefault SPI Serial Clock pin.
GP19GPIOPWMPWM, SCL, I2C, MOSI, SPIDefault SPI Master Out Slave In pin.
GP20GPIOPWMPWM, SDA, I2CPlain GPIO in OMS — no bus function modeled on these pins.
GP21GPIOPWMPWM, SCL, I2CPlain GPIO in OMS — no bus function modeled on these pins.
GNDGround
GP22GPIOPWMPWM, SDA, I2CGeneral Purpose Input / Output.
RUNSpecialRESETPull low to reset the RP2040 chip.
GP26GPIOPWM, ADCPWM, SDA, I2C, ADC012-bit ADC channel (values 0–4095).
GP27GPIOPWM, ADCPWM, SCL, I2C, ADC112-bit ADC channel (values 0–4095).
GNDGround
GP28GPIOPWM, ADCPWM, SDA, I2C, ADC212-bit ADC channel (values 0–4095).
ADC_VREFAnalogADC, Input onlyNot a usable analog input — a reference pin only.
3V3Power3.3V
3V3_ENSpecialPull low to disable the onboard regulator.
GNDGround
VSYSPower
VBUSPower5V

[!NOTE] GP23, GP24, GP29, and GP25 aren't wireable pins in OMS at all — they don't appear in the simulator's pin list. On real hardware GP23/24/29 are internal-only (SMPS mode, VBUS sense, VSYS monitor) and GP25 drives the onboard LED — OMS models the LED as a fixed built-in indicator (board_builtin_led), not a selectable header pin, the same way ESP32 DevKit V1's GPIO2 (Section 3.5) and ESP32-CAM's GPIO33 (Section 3.9) are excluded.


3. Programmable I/O (PIO) Architecture

The RP2040 features two Programmable I/O (PIO) blocks, each containing 4 independent execution state machines (8 total). These PIO blocks operate on custom assembly instructions:

  • They bypass the main Cortex-M0+ CPU, handling high-frequency bit-banging protocols directly in hardware.
  • Allows the Pico to drive custom peripherals—such as WS2812B NeoPixel displays, DVI/VGA screen signals, or custom sensor hubs—with zero CPU overhead.

[!WARNING] This is real RP2040 hardware background — OMS has no Blockly blocks for PIO at all. There is no way to write or configure a custom PIO program from Blocks mode; using PIO would require ejecting to raw C++ and writing against the Pico SDK's PIO API by hand.


4. Compiler Settings & IDE Properties

When targeting this board, the compiler utilizes the following parameters:

  • FQBN: rp2040:rp2040:rpipico
  • Default Flashing Baud Rate: 115200
  • Flash Mode / File Type: uf2 (compiled into a USB Mass Storage compatible UF2 binary)
  • Flash Memory Offsets: { bootloader: 0x0000, partitions: 0x0000, app: 0x0000 } (monolithic UF2 binary)
  • Programming Runtimes: Supports C++ (Arduino) and MicroPython.

5. Supported Blockly Board Blocks

Drawing the blocks…

6. Simulator and Flashing Diagnostics

  • Simulator: Powered by the highly accurate rp2040js emulator. Emulates full ARM instruction pipelines, internal register clocks, and interrupts. PIO state-machine instructions are not emulated (see Section 3).
  • Flashing Guide:
    1. Unplug the USB cable from the Pico.
    2. Press and hold the white physical BOOTSEL button.
    3. Reconnect the USB cable, then release BOOTSEL.
    4. The board mounts on your computer as a storage drive named RPI-RP2.
    5. Click Flash in OMS. The IDE compiles your code and saves the .uf2 file directly to the drive, which auto-unmounts and resets. If using MicroPython, once the agent is active, files are transferred directly over Web Serial without requiring BOOTSEL resets.

7. Communication Buses & Electrical Capabilities

Beyond the per-pin table above, here's the board's bus-level capability summary (from its own capabilities config):

BusDetails
UART2 hardware buses — UART0 (TX=GP0, RX=GP1) and UART1 (TX=GP4, RX=GP5).
I2CDefault on GP4 (SDA) / GP5 (SCL) — note these are shared with UART1's pins; pick one bus or the other per project.
SPIDefault on MOSI GP19, MISO GP16, SCK GP18, CS GP17.
1-WireNo dedicated 1-Wire hardware peripheral. Sensors like the DHT11 bit-bang the timing on any regular digital pin instead.
Analog (ADC)3 ADC-capable pins (GP26–GP28), 12-bit resolution. No hardware DAC, no touch.
PWMEvery GPIO pin is PWM-capable (16 channels total — 8 hardware slices × 2 channels each), 16-bit resolution, up to 125 MHz.

Electrical limits: max 12 mA per pin, max 300 mA total across all pins combined.


8. Further Reading


Raspberry Pi Pico (RP2040) — OMS Parts