The Raspberry Pi Pico (and its siblings, the Pico W and Pico H) is built around the RP2040 microcontroller, featuring 26 multifunction GPIO pins. Unlike older 8-bit microcontrollers that lock specific pins to hardware peripherals, the RP2040's flexible multiplexer and Programmable I/O (PIO) state machines mean almost any pin can become a UART, SPI, or I2C bus. Below is the definitive raspi pico pinout reference, mapping physical pins to their silicon functions, followed by the external wiring standards and hardware gotchas you need to know before soldering your first harness.
The Complete Raspi Pico Pinout Map
The Pico uses a 40-pin DIP-style footprint. The table below maps the physical pin numbers (1-40) to their RP2040 GPIO designations and primary power/ground functions. This layout assumes the board is oriented with the micro-USB port facing upward.
| Pin | Name | Primary Function | Notes / Alt Functions |
|---|---|---|---|
| 1 | GP0 | GPIO / SPI0 RX / I2C0 SDA | Default UART0 TX on some firmware |
| 2 | GP1 | GPIO / SPI0 CSn / I2C0 SCL | Default UART0 RX |
| 3 | GND | Digital Ground | Tied to AGND internally |
| 4 | GP2 | GPIO / SPI0 SCK / I2C1 SDA | PWM Slice 1A |
| 5 | GP3 | GPIO / SPI0 TX / I2C1 SCL | PWM Slice 1B |
| 6 | GP4 | GPIO / SPI0 RX / I2C0 SDA | Default I2C0 SDA |
| 7 | GP5 | GPIO / SPI0 CSn / I2C0 SCL | Default I2C0 SCL |
| 8 | GND | Digital Ground | — |
| 9 | GP6 | GPIO / SPI0 SCK / I2C1 SDA | PWM Slice 3A |
| 10 | GP7 | GPIO / SPI0 TX / I2C1 SCL | PWM Slice 3B |
| 11 | GP8 | GPIO / SPI1 RX / I2C0 SDA | PWM Slice 4A |
| 12 | GP9 | GPIO / SPI1 CSn / I2C0 SCL | PWM Slice 4B |
| 13 | GND | Digital Ground | — |
| 14 | GP10 | GPIO / SPI1 SCK / I2C1 SDA | PWM Slice 5A |
| 15 | GP11 | GPIO / SPI1 TX / I2C1 SCL | PWM Slice 5B |
| 16 | GP12 | GPIO / SPI1 RX / I2C0 SDA | PWM Slice 6A |
| 17 | GP13 | GPIO / SPI1 CSn / I2C0 SCL | PWM Slice 6B |
| 18 | GND | Digital Ground | — |
| 19 | GP14 | GPIO / SPI1 SCK / I2C1 SDA | PWM Slice 7A |
| 20 | GP15 | GPIO / SPI1 TX / I2C1 SCL | PWM Slice 7B |
| 21 | GP16 | GPIO / SPI0 RX / I2C0 SDA | Default SPI0 MISO |
| 22 | GP17 | GPIO / SPI0 CSn / I2C0 SCL | Default SPI0 CSn |
| 23 | GND | Digital Ground | — |
| 24 | GP18 | GPIO / SPI0 SCK / I2C1 SDA | Default SPI0 SCK |
| 25 | GP19 | GPIO / SPI0 TX / I2C1 SCL | Default SPI0 MOSI |
| 26 | GP20 | GPIO / SPI0 RX / I2C0 SDA | — |
| 27 | GP21 | GPIO / SPI0 CSn / I2C0 SCL | — |
| 28 | GND | Digital Ground | — |
| 29 | GP22 | GPIO / SPI1 SCK / I2C1 SDA | Last standard GPIO |
| 30 | RUN | Reset / Enable | Pull low to reset the RP2040 |
| 31 | GP26 | GPIO / ADC0 / I2C1 SDA | ADC Input 0 (12-bit) |
| 32 | GP27 | GPIO / ADC1 / I2C1 SCL | ADC Input 1 (12-bit) |
| 33 | AGND | Analog Ground | Use for ADC sensor returns |
| 34 | GP28 | GPIO / ADC2 / I2C0 SDA | ADC Input 2 (12-bit) |
| 35 | ADC_VREF | ADC Reference Voltage | Defaults to 3.3V; inject clean 2.5V for precision |
| 36 | 3V3 | 3.3V Power Output | Max draw ~300mA from onboard LDO |
| 37 | 3V3_EN | 3.3V LDO Enable | Pull low to disable the 3.3V rail |
| 38 | GND | Digital Ground | — |
| 39 | VSYS | Main System Input | Accepts 1.8V to 5.5V; feeds the onboard LDO |
| 40 | VBUS | USB 5V Power | Raw 5V from USB port; tied to VSYS via diode |
Source: Official Raspberry Pi Pico Datasheet
Rows People Get Wrong: Critical RP2040 Pin Gotchas
When reading a raspi pico pinout diagram, a few specific rows consistently cause hardware failures or firmware bugs. Here is what those pins actually mean in practice on the workbench.
Pin 25 (GP25) vs The Onboard LED
On the original Raspberry Pi Pico, GP25 is wired directly to the green user LED. However, on the Pico W, GP25 is routed to the Infineon CYW43439 Wi-Fi/Bluetooth chip to handle SPI communication. The LED on the Pico W is instead connected to WL_GPIO0 on the wireless chip. If you blindly toggle GP25 on a Pico W to blink an LED, you will crash the Wi-Fi stack. Always check your board variant via the Pico W datasheet before assigning GP25.
Pin 34 (ADC_VREF) and Noisy Readings
Pin 34 is the ADC reference voltage. By default, it is tied to the 3.3V rail. Because the Pico's onboard LDO powers both the digital logic and the ADC reference, digital switching noise (like driving a PWM motor) bleeds into your ADC readings, causing jitter. For precision analog sensors (like load cells or high-res potentiometers), bypass the internal 3.3V reference by injecting a clean, low-noise 2.5V from an external shunt regulator (like an LM4040) directly into the ADC_VREF pin.
Pin 39 (VSYS) vs Pin 40 (VBUS)
VBUS (Pin 40) is the raw 5V from the USB connector. VSYS (Pin 39) is the main system input, which accepts anywhere from 1.8V to 5.5V and feeds the internal buck-boost and LDO. They are separated by a Schottky diode. If you are building a battery-powered project, feed your LiPo or 3xAA pack into VSYS. Do not backfeed 5V into VBUS if you are also connected to a PC, as you will back-power the host USB port and potentially trip the PC's overcurrent protection.
Pin 33 (AGND) vs Standard GND
While AGND and digital GND are tied together at a single point on the PCB, running high-current digital return paths (like a relay coil ground) through AGND will create ground bounce, destroying your ADC accuracy. Always route analog sensor ground returns exclusively to Pin 33.
External Peripheral Wiring: IEC vs NEC Color Standards
The Pico itself uses standard PCB traces, but when you build custom wiring harnesses to connect the Pico to external relays, optocouplers, or mains-powered contactors, you must follow regional wire color codes. Using random Dupont jumper wire colors in a permanent industrial or home-automation installation is a safety hazard and violates electrical codes.
| Wire Function | IEC 60446 (EU / UK / AU) | NEC / NFPA 79 (US / CA) | Legacy UK (Pre-2004) |
|---|---|---|---|
| DC Positive (e.g., 24V to Relay Coil) | Brown | Red (or Ungrounded color) | Yellow |
| DC Negative / Ground (0V) | Blue | Black (or White/Grey if grounded) | Blue |
| Control Signal (GPIO to Optocoupler) | Black or Grey | Blue, Orange, or Yellow | Black |
| Earth Ground (Chassis / Shield) | Green/Yellow Stripe | Green/Yellow Stripe or Bare | Green/Yellow Stripe |
Safe Interpretation When Silkscreen Markings Fade
The white silkscreen text on the Raspberry Pi Pico is notorious for rubbing off after a few weeks of breadboarding and probing. When your board becomes blank, guessing pin functions will fry the RP2040. Here is how to safely verify your raspi pico pinout without relying on faded text.
- Identify Pin 1 (GP0): Hold the board with the micro-USB port facing away from you (or up). The top-left pin is always Pin 1 (GP0). Additionally, Pin 1 is the only GPIO pad on the board that features a slightly larger, square copper pad underneath, rather than a standard circular via.
- Map the Ground Pins: Set your multimeter to continuity mode. Probe the metal shield of the USB port—this is tied to ground. Now touch your other probe to the board. Pins 3, 8, 13, 18, 23, 28, 33 (AGND), and 38 will beep. Pin 38 is the easiest to locate as it sits directly next to the bottom-right VBUS pin.
- Verify the 3.3V Rail: Power the Pico via USB. Set your multimeter to DC Voltage. Place the black probe on a confirmed GND pin (like Pin 3) and probe the right-hand rail. Pin 36 should read exactly 3.29V to 3.31V. If you read 5V, you are on Pin 40 (VBUS). If you read 0V, you may be on Pin 37 (3V3_EN) or a GPIO.
Raspi Pico Pinout FAQ
Is the raspi pico pinout 5V tolerant for direct sensor input?
No. The RP2040 silicon operates strictly at 3.3V, and the GPIO pins are not 5V tolerant. The absolute maximum voltage on any GPIO pin is VDD + 0.3V (roughly 3.6V). Applying 5V from an external sensor (like a standard HC-SR04 ultrasonic module or a 5V Arduino output) will forward-bias the internal ESD protection diodes, pulling excessive current and permanently destroying the GPIO pad or the entire chip. You must use a bidirectional logic level shifter (like the TXS0108E) or a simple resistor voltage divider (e.g., 1kΩ and 2kΩ) to step 5V signals down to 3.3V before they reach the Pico.
Which pins on the raspi pico pinout support hardware PWM?
Every standard GPIO pin (GP0 through GP22, and GP26 through GP28) supports hardware PWM. The RP2040 contains 8 identical PWM slices, each with two channels (A and B). This gives you 16 independent PWM outputs. However, pins sharing the same slice (e.g., GP0 and GP1 share Slice 0) must operate at the same base frequency, though they can have independent duty cycles. The ADC pins (GP26-GP28) can also be used for PWM, but doing so will introduce severe noise into any simultaneous analog readings on those pins.
How do I map I2C0 and I2C1 on the standard raspi pico pinout?
While the RP2040 allows you to map I2C to almost any pin via the GPIO mux, the hardware defaults and standard breakout boards expect specific pins. I2C0 defaults to GP4 (SDA) and GP5 (SCL). I2C1 defaults to GP2 (SDA) and GP3 (SCL). If you are using MicroPython or the Pico C/C++ SDK and do not explicitly declare your pins, the firmware will attempt to use these default pairs. Always remember to use external 4.7kΩ pull-up resistors to 3.3V on both the SDA and SCL lines, as the Pico's internal pull-ups (around 50kΩ) are too weak for reliable I2C communication at 400kHz.






