Stufin
Home Quick Cart Profile

Raspberry Pi Pico H - Pico with Headers Soldered

Buy Now on Stufin

Pin Configuration

  • Raspberry Pi Pico H - Pico with Headers Soldered
  • The Raspberry Pi Pico H is a variant of the Raspberry Pi Pico microcontroller board with pre-soldered headers, making it easy to connect to breadboards, prototyping platforms, and other devices. This documentation provides a detailed explanation of each pin on the Raspberry Pi Pico H, including their functions and how to connect them.
  • Pinout Structure:
  • The Raspberry Pi Pico H has 40 pins, arranged in two rows of 20 pins each. The pinout is divided into several sections, including:
  • GPIO (General Purpose Input/Output): 26 pins (1-26)
  • Power Supply: 4 pins (27-30)
  • Analog-to-Digital Converter (ADC): 3 pins (31-33)
  • Debug: 2 pins (34-35)
  • UART: 2 pins (36-37)
  • SPI: 4 pins (38-41)
  • Pin-by-Pin Explanation:
  • 1. GPIO0: General-purpose input/output pin, can be configured as input or output.
  • 2. GPIO1: General-purpose input/output pin, can be configured as input or output.
  • ...
  • 26. GPIO25: General-purpose input/output pin, can be configured as input or output.
  • Power Supply Pins:
  • 27. VIN: Input voltage pin, connect to a power source (e.g., USB cable, battery).
  • 28. VOUT: Output voltage pin, provides power to external devices.
  • 29. GND: Ground pin, connect to a ground reference.
  • 30. GND: Ground pin, connect to a ground reference.
  • Analog-to-Digital Converter (ADC) Pins:
  • 31. ADC_VREF: Analog reference voltage input pin.
  • 32. ADC_GND: Analog ground pin.
  • 33. ADC_IN0: Analog input channel 0.
  • Debug Pins:
  • 34. SWCLK: Serial wire clock input pin for debugging.
  • 35. SWDIO: Serial wire data input/output pin for debugging.
  • UART Pins:
  • 36. UART_TX: UART transmit pin, sends data to an external device.
  • 37. UART_RX: UART receive pin, receives data from an external device.
  • SPI Pins:
  • 38. SPI_SCK: SPI clock pin, provides the clock signal for SPI communication.
  • 39. SPI_TX: SPI transmit pin, sends data to an external device.
  • 40. SPI_RX: SPI receive pin, receives data from an external device.
  • 41. SPI_CS: SPI chip select pin, selects the target device for SPI communication.
  • Connection Guidelines:
  • When connecting the Raspberry Pi Pico H to other devices or components, follow these guidelines:
  • Use the correct pinouts and voltage levels to avoid damaging the board or connected devices.
  • Use suitable cables, connectors, and adapters to ensure reliable connections.
  • Pay attention to the signal directions (input/output) and voltage levels when connecting devices.
  • Use a breadboard or PCB to organize and connect components, and ensure proper routing of signals.
  • Refer to the Raspberry Pi Pico documentation and datasheets for specific pin usage and configuration guidelines.
  • Remember to always follow safety precautions when working with electronic components, and ensure that the power supply is disconnected before making any connections.

Code Examples

Raspberry Pi Pico H - Pico with Headers Soldered
Overview
The Raspberry Pi Pico H is a microcontroller board that is part of the Raspberry Pi family. It is a low-cost, highly capable device that is ideal for a wide range of applications, including IoT projects, robotics, and embedded systems development. The Pico H variant comes with headers soldered, making it easy to connect to breadboards, protoboards, or other development boards.
Features
RP2040 microcontroller with 264KB of SRAM and 2MB of flash storage
 Dual-core Arm Cortex-M0+ processor
 Flexible I/O options, including GPIO, I2C, SPI, UART, and USB
 Supports high-level languages such as Python and C/C++
 Compatible with Raspberry Pi's official SDK and libraries
Code Examples
Example 1: Blinking an LED using MicroPython
In this example, we will use MicroPython to blink an LED connected to GPIO pin 25 on the Raspberry Pi Pico H.
```
import machine
import utime
# Set up GPIO pin 25 as an output
led = machine.Pin(25, machine.Pin.OUT)
while True:
    # Set the LED high (turn it on)
    led.value(1)
    utime.sleep(1)  # wait for 1 second
    # Set the LED low (turn it off)
    led.value(0)
    utime.sleep(1)  # wait for 1 second
```
Example 2: Reading Analog Input from a Potentiometer using C
In this example, we will use the C programming language to read an analog input from a potentiometer connected to ADC pin 26 on the Raspberry Pi Pico H.
```c
#include <stdio.h>
#include "pico/stdlib.h"
#include "pico/adc.h"
int main() {
    // Initialize the ADC module
    adc_init();
    adc_select_input(0);  // Select ADC pin 26
while (1) {
        // Read the analog input value
        uint16_t adc_value = adc_read();
        printf("ADC value: %u
", adc_value);
        sleep_ms(50);  // wait for 50ms
    }
return 0;
}
```
Example 3: Communicating with a Uart Device using Python
In this example, we will use Python to communicate with a UART device connected to the UART pins (GPIO 0 and 1) on the Raspberry Pi Pico H.
```python
import uart
# Initialize the UART module
uart.init(baudrate=9600, tx=0, rx=1)
while True:
    # Send a string to the UART device
    uart.write("Hello, UART device!")
    utime.sleep_ms(50)  # wait for 50ms
# Read data from the UART device
    data = uart.read(10)  # read up to 10 bytes
    if data:
        print("Received data:", data.decode())
```
Additional Resources
Raspberry Pi Pico datasheet: <https://www.raspberrypi.org/documentation/microcontrollers/rp2040/datasheet.pdf>
 Raspberry Pi Pico SDK documentation: <https://datasheets.raspberrypi.org/pico/rp2040-sdk-docs/>
 MicroPython documentation: <https://docs.micropython.org/en/latest/>
Note: These code examples are for demonstration purposes only and may require modifications to work with your specific setup. Always refer to the official documentation and datasheets for the Raspberry Pi Pico H and any connected devices for accurate and up-to-date information.