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.

PinNamePrimary FunctionNotes / Alt Functions
1GP0GPIO / SPI0 RX / I2C0 SDADefault UART0 TX on some firmware
2GP1GPIO / SPI0 CSn / I2C0 SCLDefault UART0 RX
3GNDDigital GroundTied to AGND internally
4GP2GPIO / SPI0 SCK / I2C1 SDAPWM Slice 1A
5GP3GPIO / SPI0 TX / I2C1 SCLPWM Slice 1B
6GP4GPIO / SPI0 RX / I2C0 SDADefault I2C0 SDA
7GP5GPIO / SPI0 CSn / I2C0 SCLDefault I2C0 SCL
8GNDDigital Ground
9GP6GPIO / SPI0 SCK / I2C1 SDAPWM Slice 3A
10GP7GPIO / SPI0 TX / I2C1 SCLPWM Slice 3B
11GP8GPIO / SPI1 RX / I2C0 SDAPWM Slice 4A
12GP9GPIO / SPI1 CSn / I2C0 SCLPWM Slice 4B
13GNDDigital Ground
14GP10GPIO / SPI1 SCK / I2C1 SDAPWM Slice 5A
15GP11GPIO / SPI1 TX / I2C1 SCLPWM Slice 5B
16GP12GPIO / SPI1 RX / I2C0 SDAPWM Slice 6A
17GP13GPIO / SPI1 CSn / I2C0 SCLPWM Slice 6B
18GNDDigital Ground
19GP14GPIO / SPI1 SCK / I2C1 SDAPWM Slice 7A
20GP15GPIO / SPI1 TX / I2C1 SCLPWM Slice 7B
21GP16GPIO / SPI0 RX / I2C0 SDADefault SPI0 MISO
22GP17GPIO / SPI0 CSn / I2C0 SCLDefault SPI0 CSn
23GNDDigital Ground
24GP18GPIO / SPI0 SCK / I2C1 SDADefault SPI0 SCK
25GP19GPIO / SPI0 TX / I2C1 SCLDefault SPI0 MOSI
26GP20GPIO / SPI0 RX / I2C0 SDA
27GP21GPIO / SPI0 CSn / I2C0 SCL
28GNDDigital Ground
29GP22GPIO / SPI1 SCK / I2C1 SDALast standard GPIO
30RUNReset / EnablePull low to reset the RP2040
31GP26GPIO / ADC0 / I2C1 SDAADC Input 0 (12-bit)
32GP27GPIO / ADC1 / I2C1 SCLADC Input 1 (12-bit)
33AGNDAnalog GroundUse for ADC sensor returns
34GP28GPIO / ADC2 / I2C0 SDAADC Input 2 (12-bit)
35ADC_VREFADC Reference VoltageDefaults to 3.3V; inject clean 2.5V for precision
363V33.3V Power OutputMax draw ~300mA from onboard LDO
373V3_EN3.3V LDO EnablePull low to disable the 3.3V rail
38GNDDigital Ground
39VSYSMain System InputAccepts 1.8V to 5.5V; feeds the onboard LDO
40VBUSUSB 5V PowerRaw 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 FunctionIEC 60446 (EU / UK / AU)NEC / NFPA 79 (US / CA)Legacy UK (Pre-2004)
DC Positive (e.g., 24V to Relay Coil)BrownRed (or Ungrounded color)Yellow
DC Negative / Ground (0V)BlueBlack (or White/Grey if grounded)Blue
Control Signal (GPIO to Optocoupler)Black or GreyBlue, Orange, or YellowBlack
Earth Ground (Chassis / Shield)Green/Yellow StripeGreen/Yellow Stripe or BareGreen/Yellow Stripe
Safety Warning: Never use IEC Brown (DC+) and Blue (DC-) for external AC mains wiring connected to a Pico-controlled relay. Mains wiring requires strict adherence to local AHJ codes (e.g., Brown/Live, Blue/Neutral in EU; Black/Hot, White/Neutral in US). The Pico's GPIO pins must only interface with the low-voltage DC control side of an isolation relay or optocoupler.

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.

  1. 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.
  2. 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.
  3. 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.