Raspberry Pi Pico RP2040 Microcontroller Board – Pinout Diagram & Arduino Pin Reference

Beautiful pinout diagram for the Raspberry Pico RP2040 microcontroller boards, in both PNG and PDF formats, and Arduino pin reference.
Raspberry-Pi-Pico-Pinout-Diagram-and-Reference-CIRCUITSTATE-Electronics-Featured-Image-01-3

Raspberry Pi Pico is a small form-factor development board and PCB module based on the RP2040 dual-core microcontroller from the Raspberry Pi Foundation, UK. On this page, you will find the pinout diagrams and references for the Raspberry Pi Pico board. If you want to learn more about the board, we have a getting started tutorial that you can find below.

Getting-Started-with-Raspberry-Pi-Pico-Pinout-Schematic-and-Programming-Tutorial-CIRCUITSTATE-Featured-Image-01-2

Getting Started with Raspberry Pi Pico : RP2040 Microcontroller Board – Pinout, Schematic and Programming Tutorial

Learn how to set up the Raspberry Pi Pico RP2040 board on your computer and write and compile programs with C/C++ SDK and Arduino IDE.

We can develop embedded firmware for you

CIRCUITSTATE can develop embedded firmware for any microcontroller/microprocessor including 8051, PIC, AVR, ARM, STM32, ESP32, and RISC-V using industry-leading SDKs, frameworks, and tools. Contact us today to share your requirements.

Electronics Networking Vector Image

Pinout Diagram

Raspberry-Pi-Pico-and-H-RP2040-Microcontroller-Board-Top-View-CIRCUITSTATE-Electronics-01
Raspberry Pi Pico header and headerless versions

Raspberry Pi has a pinout diagram for the Pico board here. But we thought we could a better job at designing one ourselves that also includes the Arduino pins. You are free to download, modify and redistribute the design under Creative Commons Attribution 4.0 International License. This pinout is also applicable for other board variants such as Raspberry Pi Pico H, W, and the WIZnet WizFi360 Pico.

Latest Revision: r0.3, 06-12-2022
Design by: Vishnu Mohanan
License: CC-BY-SA 4.0

Pinouts are based on the latest documentation from Raspberry Pi. While we try our best to be accurate and up-to-date here, we can not guarantee correctness. Please also double-check the pin assignments with that from the official documentation. If you found any errors here, please let us know in the comments. We will update our designs ASAP.

PNG

Raspberry-Pi-Pico-Pinout-Diagram-r0.3-CIRCUITSTATE-Electronics-01
Raspberry Pi Pico pinout diagram. Click for higher resolution.
License: CC-BY-SA by CIRCUITSTATE Electronics.

PDF

PDF preview may not load on mobile devices. Click the link to open an interactive preview, or download it directly.

Old Versions

  1. Version 0.1 – Raspberry-Pi-Pico-Pinout-r0.1-CIRCUITSTATE-Electronics.pdf
  2. Version 0.2 – Raspberry-Pi-Pico-Pinout-r0.2-CIRCUITSTATE-Electronics.pdf

RP2040 Pinout

Raspberry-Pi-RP2040-Microcontroller-Pinout-Diagram-1_2
RP2040 Pinout

Pinout Reference

Power & Control

Here is a list of pins used to supply power, clock, and other control signals. Pins with similar names are internally connected together and it is also recommended to the connections externally when designing a PCB.

NamePinsDescription
IOVDD1, 10, 22, 33, 42, 49Power supply for digital GPIOs, nominal voltage 1.8V to 3.3V
DVDD23, 50Digital core power supply, nominal voltage 1.1V. Can be connected to VREG_VOUT, or to some
other board-level power supply.
ADC_AVDD43Power supply for analogue-to-digital converter, nominal voltage 3.3V
USB_VDD48Power supply for internal USB Full Speed PHY, nominal voltage 3.3V
VREG_VIN44Power input for the internal core voltage regulator, nominal voltage 1.8V to 3.3V
VREG_VOUT45Power output for the internal core voltage regulator, nominal voltage 1.1V, 100mA max current
GNDExposed Pad (EP)Single external ground connection, bonded to a number of internal ground pads on the RP2040 die.
RUN26Global asynchronous reset pin. Reset when driven low, run when driven high. If no external reset is
required, this pin can be tied directly to IOVDD.
TESTEN19Factory test mode pin. Tie to GND.
XIN and XOUT20, 21Connect a crystal to RP2040’s crystal oscillator. XIN can also be used as a single-ended CMOS
clock input, with XOUT disconnected. The USB bootloader requires a 12MHz crystal or 12MHz
clock input.
RP2040 power and control pins

Memory

These pins are used to interface an external flash memory since RP2040 does not have an internal flash capacity. A Quad SPI (SPI with four data lines) interface is used for the flash interface. The QSPI pins can also be used as GPIOs if not used to interface a flash.

NamePinsDescription
QSPI_SD351Serial Data 3
QSPI_SCLK52Serial Clock
QSPI_SD053Serial Data 0
QSPI_SD254Serial Data 2
QSPI_SD155Serial Data 1
QSPI_SS_N56SPI Chip Select

SWD

Serial Wire Debug (SWD) is the interface used to program and debug the RP2040 microcontroller. Only three pins (including GND) are required for this interface and they can not be used for anything else.

NamePinsDescription
SWCLK24SWD Clock
SWDIO25SWD Data In and Out

USB

RP2040 contains a single USB 2.0 controller that can act as both host and peripheral. When wiring up a USB connector, you need at least four lines; DP, DM, VBUS, and GND. VBUS is a +5V supply sourced by an external host when RP2040 is in peripheral mode. You can use it to power the microcontroller. In USB host mode, you must use the VBUS to supply +5V to the connected device.

The USB data lines can not be used for anything else and should be left floating if not used.

NamePinsDescription
USB_DP47USB Data Positive (D+)
USB_DM46USB Data Negative (D-)

GPIO Function Matrix

The RP2040 has 30 General Purpose Input/Output (GPIO) pins; an odd number indeed. This set of pins is referred to as Bank 0 in the datasheet. Maybe we will get an additional Bank 1 with a newer version of RP2040. GPIO pins also have special functions other than digital input and output which are listed below.

GPIOF1F2F3F4F5F6F7F8F9
0SPI0 RXUART0 TX12C0 SDAPWM0 ASIOPIO0PIO1USB OVCUR DET
1SPI0 CSnUART0 RX12C0 SCLPWM0 BSIOPIO0PIO1USB VBUS DET
2SPI0 SCKUART0 CTS12C1 SDAPWM1 ASIOPIO0PIO1USB VBUS EN
3SPI0 TXUART0 RTS12C1 SCLPWM1 BSIOPIO0PIO1USB OVCUR DET
4SPI0 RXUART1 TX12C0 SDAPWM2 ASIOPIO0PIO1USB VBUS DET
5SPI0 CSnUART1 RX12C0 SCLPWM2 BSIOPIO0PIO1USB VBUS EN
6SPI0 SCKUART1 CTS12C1 SDAPWM3 ASIOPIO0PIO1USB OVCUR DET
7SPI0 TXUART1 RTS12C1 SCLPWM3 BSIOPIO0PIO1USB VBUS DET
8SPI1 RXUART1 TX12C0 SDAPWM4 ASIOPIO0PIO1USB VBUS EN
9SPI1 CSnUART1 RX12C0 SCLPWM4 BSIOPIO0PIO1USB OVCUR DET
10SPI1 SCKUART1 CTS12C1 SDAPWM5 ASIOPIO0PIO1USB VBUS DET
11SPI1 TXUART1 RTS12C1 SCLPWM5 BSIOPIO0PIO1USB VBUS EN
12SPI1 RXUART0 TX12C0 SDAPWM6 ASIOPIO0PIO1USB OVCUR DET
13SPI1 CSnUART0 RX12C0 SCLPWM6 BSIOPIO0PIO1USB VBUS DET
14SPI1 SCKUART0 CTS12C1 SDAPWM7 ASIOPIO0PIO1USB VBUS EN
15SPI1 TXUART0 RTS12C1 SCLPWM7 BSIOPIO0PIO1USB OVCUR DET
16SPI0 RXUART0 TX12C0 SDAPWM0 ASIOPIO0PIO1USB VBUS DET
17SPI0 CSnUART0 RX12C0 SCLPWM0 BSIOPIO0PIO1USB VBUS EN
18SPI0 SCKUART0 CTS12C1 SDAPWM1 ASIOPIO0PIO1USB OVCUR DET
19SPI0 TXUART0 RTS12C1 SCLPWM1 BSIOPIO0PIO1USB VBUS DET
20SPI0 RXUART1 TX12C0 SDAPWM2 ASIOPIO0PIO1CLOCK GPIN0USB VBUS EN
21SPI0 CSnUART1 RX12C0 SCLPWM2 BSIOPIO0PIO1CLOCK GPOUT0USB OVCUR DET
22SPI0 SCKUART1 CTS12C1 SDAPWM3 ASIOPIO0PIO1CLOCK GPIN1USB VBUS DET
23SPI0 TXUART1 RTS12C1 SCLPWM3 BSIOPIO0PIO1CLOCK GPOUT1USB VBUS EN
24SPI1 RXUART1 TX12C0 SDAPWM4 ASIOPIO0PIO1CLOCK GPOUT2USB OVCUR DET
25SPI1 CSnUART1 RX12C0 SCLPWM4 BSIOPIO0PIO1CLOCK GPOUT3USB VBUS DET
26SPI1 SCKUART1 CTS12C1 SDAPWM5 ASIOPIO0PIO1USB VBUS EN
27SPI1 TXUART1 RTS12C1 SCLPWM5 BSIOPIO0PIO1USB OVCUR DET
28SPI1 RXUART0 TX12C0 SDAPWM6 ASIOPIO0PIO1USB VBUS DET
29SPI1 CSnUART0 RX12C0 SCLPWM6 BSIOPIOOPIO1USB VBUS EN
RP2040 GPIO function matrix
Function NameDescription
SPIxConnect one of the internal PL022 SPI peripherals to GPIO
UARTxConnect one of the internal PL011 UART peripherals to GPIO
I2CxConnect one of the internal DW I2C peripherals to GPIO
PWMx A/BConnect a PWM slice to GPIO. There are eight PWM slices, each with two output channels (A/B). The B pin can also be used as an input, for frequency and duty cycle measurement.
SIOSoftware control of GPIO, from the single-cycle IO (SIO) block. The SIO function (F5) must be selected for the processors to drive a GPIO, but the input is always connected, so software can check the state of GPIOs at any time.
PIOxConnect one of the programmable IO blocks (PIO) to GPIO. PIO can implement a wide variety of interfaces, and has its own internal pin mapping hardware, allowing flexible placement of digital interfaces on bank 0 GPIOs. The PIO function (F6, F7) must be selected for PIO to drive a GPIO, but the input is always connected, so the PIOs can always see the state of all pins.
CLOCK GPINxGeneral purpose clock inputs. Can be routed to a number of internal clock domains on RP2040, e.g. to provide a 1Hz clock for the RTC, or can be connected to an internal frequency counter.
CLOCK GPOUTxGeneral purpose clock outputs. Can drive a number of internal clocks (including PLL outputs) onto GPIOs, with optional integer divide.
USB OVCUR DET, VBUS DET, VBUS ENUSB power control signals to/from the internal USB controller

Arduino-Pico

Here we have a list of pins that you can use in your Arduino sketches if you are using the Arduino-Pico core from @earlephilhower. These references are taken from the pins_arduino.h file.

GPIO

The 30 GPIO pins can be referenced from 0 to 29 in your Arduino sketch. But among the 30 pins, only 26 are broken out on the official Pico boards. A few of the pins are used for different control and measurement tasks. You can also reference the GPIO pins with the D prefix, eg. D21. All GPIO pins have pull-up and pull-down resistors associated with them which you can enable from the software.

  • GP29/ADC3 is used to measure VSYS.
  • GP25 is used by the debug LED.
  • GP24 is used for VBUS sense.
  • GP23 is connected to the SMPS Power Save pin.

LED

The onboard LED is connected to GPIO25.

UART

RP2040 has two dedicated UART ports (UART0 and UART1) with flow control pins. Functions of both UART instances can be assigned to multiple pins which are listed below. Additionally, the USB port can be enumerated as USB-CDC serial port which is the default Serial of Raspberry Pi Pico boards. The hardware UARTs can be invoked as Serial1 (UART0) and Serial2 (UART1). There are default pins assignments for both UARTs. But these pin assignments can be changed to other valid pins using setRX() and setTX() functions as described here. The alternative pins are given inside the brackets.

Additionally, you can use the PIO blocks to implement additional UARTs.

Arduino InstanceRXTXRTSCTS
Serial1 (UART0)1 (13, 17, 29)0 (12, 16, 28)3, 15, 192, 14, 18
Serial2 (UART1)9 (5, 21, 25)8 (4, 20, 24)7, 11, 23, 276, 10, 22, 26
Default Arduino UART pins along with alternative pins in brackets

SPI

There are two hardware SPI peripherals inside the RP2040. Similar to the UARTs, we can assign SPI functions to multiple sets of pins. Below is a list of default pins and alternative pins you can use in your Arduino sketches. You can change the pins using setRX(), setTX(), setCTS() and setSCK() functions as described here.

Additionally, you can use the PIO blocks to implement extra SPI interfaces.

Arduino InstanceSCK COPICIPOCS
SPI (SPI0)18 (2, 6, 22)19 (3, 7, 23)16 (0, 4, 20)17 (1, 5, 21)
SPI1 (SPI1)14 (10, 26)15 (11, 27)12 (8, 24, 28)13 (9, 25, 29)
Default Arduino SPI pins along with alternative pins in brackets

I2C

RP2040 has two I2C (Two Wire Interface) peripherals inside. These interfaces are referenced as Wire (I2C0) and Wire1 (I2C1) in the Arduino sketches. There are default pin assignments as well as alternative pins you can assign with functions setSCL() and setSDA() as explained here.

Arduino InstanceSDASCL
Wire (I2C0)4 (0, 8, 12, 16, 20, 24, 28)5 (1, 9, 13, 17, 21, 25, 29)
Wire1 (I2C1)26 (2, 6, 10, 14, 18, 22)27 (3, 7, 11, 15, 19, 23, 27)
Default Arduino I2C pins along with alternative pins in brackets

PWM

RP2040’s PWM block has 8 slices. Each slice can drive up to 2 pins. That gives 16 individually controlled PWM pins with 16-bit precision. All GPIO pins can be used for PWM output.

ADC

RP2040 has a single SAR ADC block inside with a maximum sampling rate of 500ksps and 12-bit precision. GPIO pins 26 to 29 can act as ADC inputs. In the Arduino, these pins are references as given below.

Arduino PinGPIO
A026
A127
A228
A329
Raspberry Pi Pico Arduino ADC pins

External Interrupts

RP2040 supports level (HIGH and LOW) and edge (rising and falling) triggered interrupts on all GPIO pins.

PIO

There are two identical Programmable IO (PIO) blocks inside the RP2040, each block with four state machines. The PIO block can be configured as a variety of hardware peripherals such as SPI, UART, SDIO, I2C, etc. All 30 GPIOs of the RP2040 can be used for PIO functions.

Arduino Mbed

There are two framework implementations for working with RP2040 in an Arduino environment. The Arduino-Pico core is maintained by @earlephilhower, and is based on the official RP2040 C/C++ SDK. Another one is the Arduino-Mbed package based on the open-source Mbed OS for microcontrollers. RP2040 pin assignments are different for both packages. Here we have the RP2040 pin assignments for the Arduino-Mbed.

GPIO

The GPIO pins can be referenced in the same way we did before, starting from 0 to 29.

UART

Only one UART is available in the Arduino-Mbed package for Raspberry Pi Pico, Serial1. The default Serial is the USB-CDC port.

Arduino InstanceRXTX
Serial110
Default Arduino UART pins for Arduino-Mbed package

SPI

Only one SPI instance is available in the Arduino-Mbed package; SPI.

Arduino InstanceSCK COPICIPOCS
SPI18191617
Default Arduino SPI pins for Arduino-Mbed package

I2C

Only one I2C instance is available.

Arduino InstanceSDASCL
Wire45
Default Arduino I2C pins for Arduino-Mbed package

ADC

ADC pin assignments are the same for Arduino-Pico and Arduino-Mbed packages for Raspberry Pi Pico.

Arduino PinGPIO
A026
A127
A228
A329
Raspberry Pi Pico Arduino ADC pins for Arduino-Mbed package
  1. Raspberry Pi Pico Datasheet
  2. RP2040 Datasheet
  3. Getting Started with Raspberry Pi Pico : RP2040 Microcontroller Board – Pinout, Schematic and Programming Tutorial
Share to your friends
Vishnu Mohanan

Vishnu Mohanan

Founder and CEO at CIRCUITSTATE Electronics

Articles: 83

Leave a Reply

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.