Raspberry Pi PICO Pinout in detail

Raspberry Pi Pico Pinout, specifications, datasheet in detail

Raspberry Pi Foundation is well known for its series of single-board computers (Raspberry Pi series). But in January 2021 they launched their first micro-controller class product know as Raspberry Pi Pico. It is built around the RP2040 Soc, a very fast but yet cost-effective microcontroller chip packed with a dual-core ARM Cortex-M0+ processor. M0+ is one of the most power-efficient ARM processors.

Raspberry Pi PICO board
Raspberry Pi PICO board

Raspberry Pi Pico is a small, fast, and versatile board that at its heart consists of RP2040, a brand-new product launched by Raspberry Foundation in the UK. It can be programmed using MicroPython or C language.

 

RP2040 Microcontroller: Heart of Raspberry pi Pico

Introduction to Raspberry Pi PICO
Introduction to Raspberry Pi PICO

RP2040 is a custom-designed processor chip by the Raspberry Pi foundation itself. It is a powerful but cost-effective processor, featuring a dual-core Arm Cortex-M0+ processor running at 133Mhz. Has 264KB of internal RAM and support for up to 16MB of onboard flash memory. A wide range of flexible I/O operations is possible including I2C, SPI, and Programmable general purpose I/O (GPIO). 

NOTE: To download the datasheet of RP2040, click here.

 

Specifications:

  • Dual-core Arm Cortex M0+ processor running at 133 MHz
  • Board comes with 264KB of SRAM, and 2MB of onboard Flash memory
  • Comes with the castellated module that allows us to solder it directly to carrier boards
  • USB 1.1 with device and host support
  • Low-power sleep and dormant modes
  • Drag-and-drop programming using mass storage over USB
  • 26 × multi-function GPIO pins
  • 2 × SPI peripherals, 2 × I2C controllers, 2 × UART peripherals, 3 × 12-bit ADC, 16 × controllable PWM channels
  • Accurate clock and timer on-chip
  • Temperature sensor
  • Accelerated floating-point libraries on-chip
  • It features 8 Programmable I/O (PIO) state machines for custom peripheral support

 

Raspberry pi PICO Pinout:

Raspberry Pi PICO Pinout
Raspberry Pi PICO Pinout

The Raspberry Pi Pico comes with a total of 40 pins including GND and Vcc pins. The pin can be categorized as Power, ground, UART, GPIO, PWM, ADC, SPI, I2C, system control, and Debugging pins.

Unlike the raspberry pi computer board series, GPIO pins present on the Pico board have multiple functions. For example, GP4 and GP5 pins can be either used as digital input or digital output or I2C1 (SDA and SCK pins) or UART1 (Rx and Tx). But only one function can be enabled at a time.

 

GPIO Pins

In Raspberry Pi Pico, out of 40 pins, 26 pins are multi-functional GPIO pins. These 26 GPIO pins can be used both as digital input and digital output. These digital pins are marked from GP0, GP1, and up to GP22. The marked GP23, GP24, and GP25 are not they are exposed on the pinout these GPIO pins are used for internal board functions:

GPIO29:          IP Used in ADC mode (ADC3) to measure VSYS/3

GPIO25:          OP Connected to user LED

GPIO24:          IP VBUS sense – high if VBUS is present, else low

GPIO23:          OP Controls the on-board SMPS Power Save pin

 

ADC or Analog to Digital Converter Pins

The board comes with four 12-bit SAR based analog to digital converters. Hence, we can use these pins to read analog inputs from various sensors. But one out of these four pins(ADC 4) is not provided as a GPIO pin on the board. This fourth ADC pin is internally connected to a temperature sensor.

NOTE: Therefore, to measure the temperature we can directly use this build-in temperature by reading the analog value of ADC4.

ADC Pin         GPIO Pins

ADC0              GP26

ADC1              GP27

ADC2              GP28

 

I2C Pins

I2C is a two-wire, bi-directional serial bus that provides an easy and quick method for transmission of transmission over a short distance between I2C enabled devices. The Raspberry Pi Pico comes with two I2C controllers, both I2C controllers are accessible through GPIO pins of Raspberry Pi Pico.

I2C Controller     GPIO Pins
I2C0 SDA    GP0/GP4/GP8/GP12/GP16/GP20
I2C0 SCL  GP1/GP5/GP9/GP13/GP17/GP21
I2C1 SDA   GP2/GP6/GP10/GP14/GP18/GP26
I2C1 SCL  GP3/GP7/GP11/GP15/GP19/GP27

 

SPI Pins

Serial Peripheral Interface (SPI) is an interface bus that is used to transfer data between the microcontroller and SPI-enabled devices. Raspberry Pi Pico supports two SPI interfaces that are accessible through GPIO pins of the board.         

SPI Controller    GPIO Pins
SPI0_RX   GP0/GP4/GP16
SPI0_TX   GP3/GP7/GP19
SPI0_CLK     GP2/GP6/GP18
SPI0_CSn      GP1/GP5/GP17
SPI1_RX    GP8/GP12
SPI1_TX  GP11/GP15
SPI1_CLK       GP10/GP14
SPI1_CSn   GP9/GP13

 

UART Pins

The Raspberry Pi Pico also contains two identical UART peripherals. UART (universal asynchronous receiver-transmitter) pins are used for asynchronous serial communication between the micro-controller and UART devices or other microcontrollers.

UART Pins   GPIO Pins
UART0-TX   GP0/GP12/GP16
UART0-RX   GP1/GP13/GP17
UART1-TX GP4/GP8
UART1-RX   GP5/GP9

 

PWM Pins

PWM pins on R-Pi PICO
PWM pins on R-Pi PICO

Image source: www.RaspberryPi.org

The Raspberry Pi Pico has 8 PWM blocks/slices(1-8) and each PWM block provides up to two PWM outputs(A-B). This means each block can drive up to two PWM outputs. Hence, there is a total of 16 PWM output channels available at a time and every GPIO pin on the pico is capable of PWM. So all GPIO pins can be configured to get PWM signal output when required but two GPIO pins with the same PWM designation cannot be used at once.

NOTE: The above paragraph may seem confusing, but don’t worry: all it means is that you must keep track of the PWM output signal and block you’re using, making sure not to use two GPIO pins having the same number and letter designation together.

 

GPIO Interrupts

All GPIO pins on the board can be configured as an external interrupt if one of the following changes in the state of GPIO pins occur:

  1. Level high(+3v)
  2. Level Low(GND)
  3. Positive edge (transition from active low to active high)
  4. Negative edge (transition from active high to active low)

 

Other Pins:-

GND: is the Ground pin used to complete the circuit.

VBUS: is the micro-USB input voltage it is connected to micro-USB port pin 1.

VSYS: is the main system input voltage, which can vary in the allowed range 1.8V to 5.5V, and is used by the on-board

SMPS: to generate the 3.3V for the board and its GPIO.

3V3_EN: connects to the onboard SMPS enable pin, and is set to high (to VSYS) connected through a 100K resistor. To disable the 3.3V(which also de-powers the RP2040), short this pin low.

3V3: is the main 3.3V supply to the board and its I/O, generated by the on-board SMPS. This pin can also be used to power external components.

ADC_VREF: is the ADC pin power supply voltage, and is generated by filtering the 3.3V supply coming through the board.

AGND: is the ground reference for GPIO26-29, there is a separate analog ground plane running under these signals and terminating at this pin. If the ADC pins are not used or ADC performance is doesn’t matter, this pin can be connected to digital ground.

RUN: is the RP2040 enable pin, and has an internal (on-chip) pull-up resistor to 3.3V of about ~50K Ohms. To resetRP2040, short this pin low.

 


Read Similar Articles:

| Raspberry Pi 4 GPIO Pinout and Specs in detail

| Raspberry Pi Zero GPIO pinout and specifications in detail

Arduino Mega pinout and specifications in detail

Leave a Reply

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