The overview, with examples running, is on the board page and The Raspberry Pi Pico model (every register).
The Raspberry Pi Pico
An RP2040 on our Cortex-M0+ core: one core, SIO GPIO, the TIMER, UART0 and PWM.
What it is
The Raspberry Pi Pico, an RP2040 running on our own Cortex-M core in its ARMv6-M profile. Firmware is a Thumb ELF talking to the real RP2040 addresses, so the same image runs on real hardware.
The system clock is 125 MHz from reset, because the clock tree is not modeled and there is nothing to bring up.
The pins
The 40-pin header, in the order the board has it.
Left column, pins 1 to 20: GP0, GP1, GND, GP2 to GP5, GNDb, GP6 to
GP9, GNDc, GP10 to GP13, GNDd, GP14, GP15.
Right column, pins 40 down to 21: VBUS, VSYS, GNDe, 3V3_EN, 3V3,
ADC_VREF, GP28, AGND, GP27, GP26, RUN, GP22, GNDf, GP21,
GP20, GP19, GP18, GNDg, GP17, GP16.
The board silkscreens GND on all seven grounds; here they carry letters so
each name is unique. The test points and the SWD header are not pins.
This is a 3.3 volt board and its pins are not 5 V tolerant. 3V3 supplies
3.3 V, VBUS supplies 5 V and VSYS supplies 4.7 V, which is 5 V through the
board's own Schottky diode.
GP23, GP24 and GP25 exist in the model but are not on the header, as on
the real board. GP25 is the on-board LED, which is why LED_BUILTIN is 25.
What is modeled
SIO GPIO, the 64 bit TIMER, UART0 and PWM. Every PWM slice drives channel A on an even pin and channel B on an odd one, which is how the on-board LED on GP25 can be faded.
That is the set pinMode, digitalWrite, digitalRead, analogWrite,
millis, micros, delay, Serial and attachInterrupt need, at their real
addresses.
What is not
A long list, and it is worth reading before you plan a project around one of them: PIO, DMA, the ADC, SPI, I2C, USB, the watchdog, the RTC, the clock tree, the QSPI flash interface, the second core, the on-chip ROM and the interpolators.
Their address blocks are unmapped, so touching one is a bus fault rather than a silent zero. That is deliberate: a program that quietly reads nothing is harder to debug than one that stops.
The Pico SDK is also out of scope, because its start-up code expects the second-stage bootloader, the clock tree, the crystal oscillator and the PLLs. Build against the editor's own runtime instead, which is what pressing Run does.
The ADC's absence is the one to watch: GP26, GP27, GP28 and ADC_VREF
are on the header and on the part, and there is no converter behind them.
Two approximations are worth knowing as well. The core runs in 1.024 us chunks rather than one instruction at a time, because a Cortex-M interpreter has no headroom at 125 MHz: timer alarms, PWM edges and UART bytes land on their exact cycle, but a pin change made by software can be up to a microsecond late. And the system clock is always 125 MHz, whatever a sketch programs, because the clock tree is not there.
The full list, and section 8's sorting of what is a data sheet number and what is an approximation, is in the Raspberry Pi Pico model.
Stock Arduino libraries
A tutorial that includes Servo.h, Wire.h, SPI.h, EEPROM.h,
LiquidCrystal_I2C.h, Adafruit_GFX.h with Adafruit_SSD1306.h and DHT.h
compiles here as it stands. Each is Mokxi's own header under the upstream name,
written on the drivers for the parts in the bin, and none of it is the upstream
library's code.
Wire.begin()puts the I2C bus onGP4(SDA) andGP5(SCL).EEPROM.hworks, but this board's model has no EEPROM or writable flash, so the bytes live in 4 KB of RAM: they read back within a Run and are gone at a reset.Adafruit_NeoPixel.hstops with a message: a WS2812 bit is too short to make by hand on this board, and only the ESP32-C3 and ESP32-C6 drive the strip.
The code editor and compiling lists what each one covers and how it differs from the upstream library.
The examples
Blink, Button, Serial, Fade and Chaser.
Elsewhere
- The board page: /boards/pico
- The contract document: the Raspberry Pi Pico model
- The learning path: Embedded on the Raspberry Pi Pico, at /learn