XIAO RP2040 Complete Pin Guide

Your XIAO RP2040 is a tiny board with 14 GPIO pins total:

What is GPIO?

GPIO = General Purpose Input/Output

It means the pins can be programmed to do different things depending on what you need:

Input Mode:

The pin reads signals coming IN

Output Mode:

The pin sends signals OUT

"General Purpose" means:

You choose what each pin does in your code! The same pin can be:

Let me break down what each pin can do:

TOP SIDE PINS (Main Headers)

Left Side (7 pins)

D0 (A0) - GPIO 26 - Digital/Analog/PWM

D1 (A1) - GPIO 27 - Digital/Analog/PWM

D2 (A2) - GPIO 28 - Digital/Analog/PWM

D3 (A3) - GPIO 29 - Digital/Analog/PWM

D4 (SDA) - GPIO 6 - Digital/PWM/I2C Data

D5 (SCL) - GPIO 7 - Digital/PWM/I2C Clock

D6 (TX) - GPIO 0 - Digital/PWM/UART TX

Right Side (7 pins)

D7 (RX) - GPIO 1 - Digital/PWM/UART RX

D8 (SCK) - GPIO 2 - Digital/PWM/SPI Clock

D9 (MISO) - GPIO 4 - Digital/PWM/SPI

D10 (MOSI) - GPIO 3 - Digital/PWM/SPI

3V3 - 3.3V Power Output

GND - Ground

5V - 5V Power (from USB)

Digital pins (marked with D):

Analog pins (marked with A):

Important note: Analog pins can also be used as digital pins, but digital pins usually cannot be used as analog inputs (though some boards have multiple analog-capable pins that aren't all marked with A).

TOP SIDE PINS (Main Headers)

Left Side (7 pins)

D0 (A0) - GPIO 26 - Digital/Analog/PWM

D1 (A1) - GPIO 27 - Digital/Analog/PWM

D2 (A2) - GPIO 28 - Digital/Analog/PWM

D3 (A3) - GPIO 29 - Digital/Analog/PWM

D4 - GPIO 6 - Digital/PWM

D5 - GPIO 7 - Digital/PWM

D6 (TX) - GPIO 0 - Digital/PWM/UART TX

Right Side (7 pins)

D7 (RX) - GPIO 1 - Digital/PWM/UART RX

D8 (SCK) - GPIO 2 - Digital/PWM/SPI SCK

D9 (MISO) - GPIO 4 - Digital/PWM/SPI MISO

D10 (MOSI) - GPIO 3 - Digital/PWM/SPI MOSI

3V3 - 3.3V Power Output

GND - Ground

5V - 5V Power (from USB)

CRITICAL SAFETY WARNING

3.3V LOGIC ONLY!

Safe to connect:

DANGER - Will destroy the board:

BOTTOM SIDE PINS (Solder Pads)

These are under the board and need to be soldered to access:

SWCLK - Debug Clock Pin

SWDIO - Debug Data Pin

RESET (RUN) - Reset Pin

BOOT - Bootloader Mode Pin

GPIO 16 - RGB LED Green

GPIO 17 - RGB LED Red

GPIO 25 - RGB LED Blue

SWCLK - Debug Clock Pin

SWDIO - Debug Data Pin

RESET (RUN) - Reset Pin

BOOT - Bootloader Mode Pin

GPIO 16 - RGB LED Green

GPIO 17 - RGB LED Red

GPIO 25 - RGB LED Blue

Important Notes:

  1. These pads are NOT extra GPIO pins - They're for debugging and LED control
  2. SWCLK and SWDIO cannot be used as regular GPIO - They're dedicated to debugging only
  3. Pads are spaced at 2.54mm - Standard spacing for pogo pins or headers
  4. Soldering required - These are test pads, not pre-soldered headers

Note: The XIAO RP2040 doesn't have additional GPIO pins (D11-D18) on the bottom like some other XIAO models. The bottom pads are mainly for debugging, reset control, and the built-in RGB LED.

Chip Pin (Internal numbering)

This is the actual physical pin number on the RP2040 chip itself.

Think of it like: The chip's birth name

Device Pin (Board labeling)

This is the label Seeed Studio gave to the pins on the XIAO board for easy use.

Think of it like: The chip's nickname on this board

When reading datasheets:

When debugging:

How They Connect

The XIAO RP2040 maps the easy board labels to the actual chip pins:

Device Pin (What you see) Chip Pin (What it really is) GPIO Number
D0 P26 GPIO 26
D1 P27 GPIO 27
D2 P28 GPIO 28
D3 P29 GPIO 29
D4 P6 GPIO 6
D5 P7 GPIO 7
D6 P0 GPIO 0
D7 P1 GPIO 1
D8 P2 GPIO 2
D9 P4 GPIO 4
D10 P3 GPIO 3

PIN CAPABILITIES - What Each Type Does

1. Digital Pins (ALL 11 pins)

2. Analog Input Pins (4 pins: A0-A3)

Analog Pins:

3. PWM Pins (ALL 11 pins!)

4. Communication Pins

UART (Serial) - 1 set

I2C - 1 set

SPI - 1 set

POWER PINS

5V Pin

3V3 Pin

GND Pin

BATTERY SUPPORT

Important: The XIAO RP2040 does NOT have built-in battery charging like some other XIAO models.

Boot & Reset Controls

BOOT Button

RESET Button (RUN)

User-Controllable LED Pins (Advanced)

The RGB LED can also be controlled by individual color pins:

Note: These are active LOW (opposite of normal Arduino)

IMPORTANT WARNINGS

1. 3.3V Logic ONLY!

2. Current Limits