Aziz Bench

Raspberry Pi Pico pinout

Every RP2040 GPIO can do several jobs, but each I²C, SPI and UART signal lives on specific pins. Tap a pin to see its functions, or list your project pins to check that buses and PWM channels line up.

Raspberry Pi Pico · RP2040ESP32 pinout →
  • Free to use
  • Power and control
Add pin

My pin plan

    No pins yet. Pick a pin on the map, or add one with the form.

    Ready to paste at the top of a sketch or in an issue.

    How the RP2040 pin functions repeat

    Unlike the ESP32, the RP2040 has no GPIO matrix: each peripheral signal can only appear on certain pins. The good news is that the table follows a regular pattern, so you can work it out without a datasheet.

    I²C alternates every two pins: GP0 and GP1 are I²C0 SDA and SCL, GP2 and GP3 are I²C1, GP4 and GP5 are I²C0 again, and so on. SDA is always on an even pin and SCL on an odd one, and the two must belong to the same controller: GP4 with GP5 works, and so does GP4 with GP9.

    SPI comes in groups of four pins, in the order RX (MISO), CSn, SCK and TX (MOSI). GP0 to GP7 belong to SPI0, GP8 to GP15 to SPI1, GP16 to GP23 to SPI0 again. UART follows a similar pattern, with TX on the first pin of each group of four and RX on the second.

    PWM has 8 slices with two outputs each, A on even pins and B on odd ones. GP0 and GP16 both connect to slice 0 output A: if you use both, they carry the same signal. Two pins on the same slice, such as GP2 and GP3, share the frequency but can have different duty cycles.

    Pins the board keeps for itself

    Four RP2040 GPIOs are not on the header. GP23 controls the power-save mode of the switching converter, GP24 detects USB power, GP25 drives the onboard LED and GP29 measures VSYS through a divider on ADC3. On the Pico W, GP23 to GP25 are used by the wireless chip, GP29 is shared between its clock and the VSYS measurement, and the LED is controlled through the wireless chip.

    Full Raspberry Pi Pico GPIO table

    GPIOPinI²CSPIUARTPWMADC
    GP01I2C0 SDASPI0 RXUART0 TXPWM0 A—
    GP12I2C0 SCLSPI0 CSnUART0 RXPWM0 B—
    GP24I2C1 SDASPI0 SCKUART0 CTSPWM1 A—
    GP35I2C1 SCLSPI0 TXUART0 RTSPWM1 B—
    GP46I2C0 SDASPI0 RXUART1 TXPWM2 A—
    GP57I2C0 SCLSPI0 CSnUART1 RXPWM2 B—
    GP69I2C1 SDASPI0 SCKUART1 CTSPWM3 A—
    GP710I2C1 SCLSPI0 TXUART1 RTSPWM3 B—
    GP811I2C0 SDASPI1 RXUART1 TXPWM4 A—
    GP912I2C0 SCLSPI1 CSnUART1 RXPWM4 B—
    GP1014I2C1 SDASPI1 SCKUART1 CTSPWM5 A—
    GP1115I2C1 SCLSPI1 TXUART1 RTSPWM5 B—
    GP1216I2C0 SDASPI1 RXUART0 TXPWM6 A—
    GP1317I2C0 SCLSPI1 CSnUART0 RXPWM6 B—
    GP1419I2C1 SDASPI1 SCKUART0 CTSPWM7 A—
    GP1520I2C1 SCLSPI1 TXUART0 RTSPWM7 B—
    GP1621I2C0 SDASPI0 RXUART0 TXPWM0 A—
    GP1722I2C0 SCLSPI0 CSnUART0 RXPWM0 B—
    GP1824I2C1 SDASPI0 SCKUART0 CTSPWM1 A—
    GP1925I2C1 SCLSPI0 TXUART0 RTSPWM1 B—
    GP2026I2C0 SDASPI0 RXUART1 TXPWM2 A—
    GP2127I2C0 SCLSPI0 CSnUART1 RXPWM2 B—
    GP2229I2C1 SDASPI0 SCKUART1 CTSPWM3 A—
    GP2631I2C1 SDASPI1 SCKUART1 CTSPWM5 AADC0
    GP2732I2C1 SCLSPI1 TXUART1 RTSPWM5 BADC1
    GP2834I2C0 SDASPI1 RXUART0 TXPWM6 AADC2

    Default pins of the Pico SDK: I²C0 on GP4/GP5, SPI0 on GP16 to GP19, UART0 on GP0/GP1. MicroPython and Arduino cores can use other defaults, so check the documentation of the one you use.

    Frequently asked questions

    Is the Raspberry Pi Pico 5 V tolerant?

    No. The RP2040 GPIOs work at 3.3 V and are not 5 V tolerant. Use a level shifter or a resistor divider for 5 V signals. VSYS accepts up to 5.5 V, but that is a power input, not a signal pin.

    Which Pico pins are analog?

    GP26, GP27 and GP28, on physical pins 31, 32 and 34, are the three ADC inputs on the header. A fourth channel, GP29, measures VSYS on the board, and a fifth reads the internal temperature sensor.

    Can I use any pins for I2C on the Pico?

    Not any pin, but many: the I²C functions alternate every two pins between I²C0 and I²C1. Pick SDA on an even pin and SCL on an odd pin of the same controller, for example GP4 and GP5 for I²C0, GP6 and GP7 for I²C1, or GP4 and GP9, both on I²C0.

    Why do two PWM pins change together?

    Pins whose numbers differ by 16, such as GP0 and GP16, connect to the same PWM slice and output. Setting one changes the other. Pick pins on different slices, or on the A and B outputs of the same slice if the same frequency is fine.

    Does this pinout apply to the Pico W and the Pico 2?

    The Pico W has the same header layout; only the internal pins GP23 to GP25 and GP29 change role, because they connect to the wireless chip. The Pico 2 also keeps the same header layout, but its RP2350 chip adds functions, so check its datasheet for the details.