Skip to content
My Account

Reference

Raspberry Pi Pico Pinout

The complete pin reference for the Raspberry Pi Pico: 40 pins, GPIO numbers, default UART, I2C and SPI pins, ADC, boot mode and how to flash it.

  • RP2040
  • 40 pins
  • No Wi-Fi
  • Micro-USB
No ratings yet, be the first.

Overview

The Raspberry Pi Pico is a small microcontroller board built around the RP2040 chip. It has no Wi-Fi and no operating system: you flash a program onto it and it runs right away. It is a good first board if you want a fast, cheap microcontroller with a lot of flexible pins. Programs can be written in MicroPython, CircuitPython or C/C++.

No Wi-Fi, Bluetooth or Matter badge here on purpose: this board has no radio at all. Only badges for what this exact board supports are shown. For wireless, look at the W version of the board.

RP2040, two coresTwo Arm Cortex-M0+ cores at up to 133 MHz, with 264 KB SRAM and 2 MB of flash on the board.
26 usable GPIOs23 digital only and 3 with analog input. Almost every pin can be given to UART, SPI, I2C or PWM.
Castellated, 40 pinsThe edges are castellated, so you can solder the Pico flat onto another board as a module.

Chip and board

The RP2040 is a dual-core microcontroller with 264 KB of SRAM. The board adds 2 MB of QSPI flash, a micro-USB connector, a BOOTSEL button, an LED on GPIO 25 and a 3-pin DEBUG header for SWD. 2 x UART, 2 x SPI, 2 x I2C, 16 PWM channels and 8 PIO state machines are available.

In the drawing the board has the micro-USB connector at the bottom. The BOOTSEL button is on the right of the board, the LED sits next to the USB connector, and the three DEBUG pads are at the top edge. The pin numbers in this guide are the physical pin numbers of the datasheet, counted with the USB connector at the top, starting at the top left. That is why pin 1 is at the bottom right of the pictures.

Getting started

The Pico works over micro-USB. If your computer shows no drive in BOOTSEL mode, try a different cable first.

1. What you needA Raspberry Pi Pico, a micro-USB data cable (not a charge-only cable) and a computer.
2. Install the softwareInstall Thonny and use it to flash MicroPython, or use the Arduino IDE with the Pico board package, or the Pico C/C++ SDK.
3. Enter the bootloader and uploadHold the BOOTSEL button while plugging in the USB cable, then release it. The board shows up as a drive. Drag a .uf2 file onto it and the board restarts and runs the program.

Specifications

Specifications from the Raspberry Pi Pico datasheet.

Compute

ChipRP2040, dual-core Arm Cortex-M0+, up to 133 MHz
SRAM264 KB
Flash2 MB (external, QSPI, with XIP and a 16 KB cache)

Interfaces

GPIO26 usable (GPIO 0 to 22 digital only, 26 to 28 digital or ADC), fixed 3.3 V logic
ADC3 external channels (12-bit) plus an internal temperature sensor
Interfaces2 x UART, 2 x SPI, 2 x I2C, 16 x PWM, 8 x PIO state machines

Physical

USBMicro-USB, USB 1.1 device and host
Input voltage1.8 to 5.5 V on VSYS, 5 V ± 10% on VBUS
Operating temperature-20 to 85 °C
Size51 x 21 mm, 1 mm thick PCB

Dimensions

The board is a single-sided 51 x 21 mm PCB, 1 mm thick, with the micro-USB connector overhanging one end. The 40 main pins sit on a 2.54 mm grid, 17.78 mm between the two rows, with 1 mm holes, so the board fits a breadboard or veroboard. There are four mounting holes of 2.1 mm.

Raspberry Pi Pico dimensions: 51 by 21 mm with 40 pins at 2.54 mm pitch

Source: the mechanical drawing in the datasheet. The picture is schematic.

Advertisement

Pinout diagram: component side

The number in the circle is the physical pin number of the datasheet. The USB connector is at the bottom, so the left row runs from pin 21 at the top to pin 40, and the right row from pin 20 at the top down to pin 1.

Raspberry Pi Pico pinout diagram, component side, with the 40 pins, GPIO numbers and functions

Pinout diagram: back

The back is mirrored: the same pins sit in the other row. There are also six test points (TP1 to TP6) on the back: ground, USB DM, USB DP, GPIO23, GPIO25 and BOOTSEL.

Raspberry Pi Pico pinout diagram, back, with the 40 pins, GPIO numbers and functions

Pin table

The same pins as a table, counted with the USB connector at the top, as in the official documentation.

PinFunctionPinFunction
1GP040VBUS
2GP139VSYS
3GND38GND
4GP2373V3_EN
5GP3363V3 (OUT)
6GP435ADC_VREF
7GP534GP28
8GND33AGND
9GP632GP27
10GP731GP26
11GP830RUN
12GP929GP22
13GND28GND
14GP1027GP21
15GP1126GP20
16GP1225GP19
17GP1324GP18
18GND23GND
19GP1422GP17
20GP1521GP16

GPIO map at a glance

The Raspberry Pi Pico brings out 26 of the 30 GPIOs of the chip. GPIO 23, 24, 25 and 29 are used on the board.

Raspberry Pi Pico GPIO map with the ADC pins, the default UART, I2C and SPI pins and the pins used on the board

GPIO quick reference

FunctionDefault pins
UART0GP0 (TX) and GP1 (RX)
I2C0GP4 (SDA) and GP5 (SCL)
SPI0GP16 (RX), GP17 (CS), GP18 (SCK), GP19 (TX)
ADCGP26 (ADC0), GP27 (ADC1), GP28 (ADC2)
On-board LEDGP25 (not on the header)
Power3V3 (OUT) on pin 36, VSYS on pin 39, VBUS on pin 40
Used internallyGPIO 23 (power save pin of the regulator), GPIO 24 (VBUS sense), GPIO 25 (LED), GPIO 29 (ADC3, measures VSYS/3)
GroundPins 3, 8, 13, 18, 23, 28, 33 and 38
ResetRUN on pin 30, with a pull-up to 3.3 V of about 50 kΩ. Pull low to restart the board
Regulator3V3_EN on pin 37, pulled high to VSYS through 100 kΩ. Pull low to switch off the 3.3 V

Almost every GPIO pin can be assigned to UART, SPI, I2C or PWM through the pin multiplexer, so the defaults above are only a starting point. The defaults come from the Pico SDK board file.

Advertisement

Flashing and boot

ItemPurpose
BOOTSELHold while plugging in to enter the USB bootloader
RUN (pin 30)Pull to GND to reset the chip
DEBUG headerSWD (SWCLK, GND, SWDIO) for a debug probe
USBPower, programming and serial output

Compared with other boards

PicoPico 2Zero 2 W
TypeMicrocontrollerMicrocontrollerLinux computer
ChipRP2040RP2350Quad-core Cortex-A53 (RP3A0)
Wi-Fi and BluetoothNoNoYes
Pins40, 2.54 mm grid40, 2.54 mm grid40-pin GPIO header

See also the Raspberry Pi Pico 2 pinout and the Raspberry Pi Zero 2 W guide.

Real gotchas

  • Pin numbers versus GP numbers. Pin 1 is GP0, pin 31 is GP26. Libraries use the GP number.
  • 3.3 V only. The GPIO pins are not 5 V tolerant.
  • Analog pins have a diode to 3.3 V. The input may not exceed 3.3 V by more than about 0.3 V, and a voltage on GP26 to GP28 leaks into the 3.3 V rail when the board is unpowered.
  • Power from VBUS and VSYS together. Do not feed power into VBUS or VSYS while also using the USB cable without a diode between them.
  • No Wi-Fi. If you need that, look at the Pico W.

Safety notes

Before you wire anything up

  • GPIO pins are 3.3 V. Do not connect a 5 V signal directly.
  • VBUS (pin 40) is the 5 V from USB. VSYS (pin 39) is the main supply input and accepts 1.8 to 5.5 V.
  • The datasheet recommends keeping the load on the 3V3 (OUT) pin below 300 mA. Do not power motors, servos or long LED strips from it.
  • Each GPIO pin can only source a few mA. Use a driver or a transistor for loads.

Conclusion

The Raspberry Pi Pico is a fast, cheap microcontroller board with 26 flexible GPIO pins and a pinout that is easy to remember: use the physical pin numbers of the datasheet, keep 3.3 V logic and use BOOTSEL to flash it.

Advertisement
All guides

More guides

Keep building.

From ESP32 HomeKit accessories to Arduino and ATtiny reference guides, there’s more where this came from.

All guides