Raspberry Pi Pico Breadboard Shields

This is a collection of different shields with a breadboard area specifically designed for use with a Raspberry Pi Pico (W) for rapid prototyping. Ranging from very simple setups, just to reach the individual signals, to providing already more complex components such as digital inputs and outputs (buttons, LEDs or buzzer), joysticks (digital or analog), displays with or without touchscreen, multi-color (RGB) LEDs, or TF/SD card slots.

Supported Shields

Hardware

The GeeekPi Pico Breadboard Kit (EP-0164) [1] shield comes with the built-in controller ILI9341 [20] inside the LCD, which is an LCD controller with 240 × RGB × 320 pixels, while the pixels of this 2.8-inch LCD itself is 240 (H) RGB × 320 (V). There are two types of horizontal and vertical screens, so the internal RAM of the LCD is not fully used. The LCD supports 16-bit, and 18-bit, input color formats per pixel, namely RGB565, and RGB666, three color formats. This integration uses the RGB565 color format, which is also a commonly used RGB format. The LCD uses a four-wire SPI communication interface.

Additional there are a resistive Touch Screen (TS) with the TS controller XPT2046 [32].

Features and Resources

Printed Circuit Board

5V/40㎃

0 1 2 3 0 1 2 3 PIEZO LCD/TS

5 (14) (5) 2 1

  • 1 serial 2.8-inch 320×240 IPS 262K LCD

  • 4 User keys

  • 4 User LEDs

  • 1 Piezo buzzer

  • 1 RST signal to LCD controller

  • 1 C/D signal to LCD controller

  • not wired: 1 IRQ signal from TS controller

Design Data

GeeekPi Pico Breadboard Kit

Defective Hardware

Apart from the fact that the LCD and TSC are connected via unusual pins to the RP2040 and thus the on-chip SPI controllers cannot be used for chip select signal operation to the LCD or TSC, the final interrupt provided by the TSC was not connected. This means that the touch screen of this shield cannot be used out-of-the-box. The TSC will only work with a hardware correction (see figures below). To do this, the /PENIRQ signal from pin 11 of the XPT2046 (U1) must be connected as TP_IRQ signal with GP9 to pin 12 of the Raspberry Pi Pico (W) header (J1) as digital input.

Wiring Diagram

Printed Circuit Board

GeeekPi Pico Breadboard Kit wiring diagram HW fix GeeekPi Pico Breadboard Kit PCB HW fix with wire

Positions

GeeekPi Pico Breadboard Kit details
  1. Rapsberry Pi Pico header
  2. Power Output
  3. ILI9341 (on front side)
    2.8-inch 320×240 pixels 65K colorful IPS LCD
  4. XPT2046 (on back side)
    resistive touch screen controller
  1. Piezo Buzzer
    5.0Vo-p (3.0~8.0V) @ 2.400㎑±300㎐ with ≥85㏈
    on terminal for the momentary push buttons
  2. User Buttons
    terminal to four momentary push buttons
  3. User LEDs
    terminal to four indicator LEDs

Data Sheets

Pinouts

Pin Mapping

Pinout

on-edge(1-40):

5 (14) (5) 2 1

on-shield:

4 BUTTON 4 LEDs 1 PIEZO 1 LCD/TSC

Default Zephyr Peripheral Mapping

 

  • 1 PIO/PWM : GP0 (PWM0)
  • 2 PIO/PWM : GP1 (PWM1)
  • 3 GND
  • 4 PIO/PWM : GP2 (PWM2)
  • 5 PIO/PWM : GP3 (PWM3)
  • 6 PIO/PWM : GP4 (PWM4)
  • 7 PIO/PWM : GP5 (PWM5)
  • 8 GND
  • 9 SPI0_SCK : GP6 (PWM6)
    nc on-shield LCD i/f clock LCD_CLK
  • 10 SPI0_TX : GP7 (PWM7)
    nc on-shield LCD i/f data LCD_DIN
  • 11 SPI1_RX : GP8 (PWM8)
    nc on-shield TSC i/f data TP_MISO
  • 12 PIO/PWM : GP9 (PWM9)
    nc (requires manual wiring)
    nc on-shield TSC interrupt req. TP_IRQ
  • 13 GND
  • 14 SPI1_SCK : GP10 (PWM10)
    nc on-shield TSC i/f clock TP_CLK
  • 15 SPI1_TX : GP11 (PWM11)
    nc on-shield TSC i/f data TP_MOSI
  • 16 PIO/PWM : GP12 (PWM12)
    nc on-shield TSC chip select TP_CS
  • 17 PIO/PWM : GP13 (PWM13)
    nc on-shield LCD chip select LCD_CS
  • 18 GND
  • 19 PIO/PWM : GP14 (PWM14)
    nc on-shield LCD reset LCD_RST
  • 20 PIO/PWM : GP15 (PWM15)
    nc on-shield LCD data/cmd LCD_DC
  • 21 PIO/PWM : GP16 (PWM0)
  • 22 PIO/PWM : GP17 (PWM1)
  • 23 GND
  • 24 PIO/PWM : GP18 (PWM2)
  • 25 PIO/PWM : GP19 (PWM3)
  • 26 PIO/PWM : GP20 (PWM4)
  • 27 PIO/PWM : GP21 (PWM5)
  • 28 GND
  • 29 PIO/PWM : GP22 (PWM6)
  • 30 RUN (RESET)
  • nc PIO/PWM : GP23 (PWM7)
  • nc PIO/PWM : GP24 (PWM8)
  • nc PIO/PWM : GP25 (PWM9)
  • 31 ADC_CH0 : GP26 (PWM10)
  • 32 ADC_CH1 : GP27 (PWM11)
  • 33 GND
  • 34 ADC_CH2 : GP28 (PWM12)
  • nc ADC_CH3 : GP29 (PWM13)
  • 35 ADC_VREF
  • 36 3V3(OUT)
  • 37 3V3_EN
  • 38 GND
  • 39 VSYS
  • 40 VBUS
GeeekPi Pico Breadboard Kit edge pinout

Pin Mapping

Pinout

Our advice for connecting the User Buttons and LEDs

 

To be able to use the User Buttons and LEDs, they must be individually connected to freely available GPIO lines. For this purpose, GP0 to GP5, GP16 to GP22 and also the analog inputs on GP26 to GP28 can be used. The Piezo buzzer must also be connected individually. We recommend the following possible connections, as they are also specified by the shield by default:

 

  • 4 0 : GP2 PWM2
  • 5 1 : GP3 PWM3
  • 6 2 : GP4 PWM4
  • 7 3 : GP5 PWM5
  • 21 0 : GP16 (PWM0)
  • 22 1 : GP17 (PWM1)
  • 23 2 : GP18 (PWM2)
  • 24 3 : GP19 (PWM3)
  • 29 PIEZO : GP22 PWM6

This leaves enough options for using the analog inputs and / or the remaining UART or I2C controllers.

 

Devicetree compatible

GeeekPi Pico Breadboard Kit edge pinout with User Buttons and LEDs

Utilization

This shields can be used with any development board, shield, or snippet that provides a Devicetree node with the raspberrypi,pico-header-r3 property for the compatibility. In particular, one SPI bus and some GPIO signals on this edge connector must be free for communication with the components on the breadboard shields. The shields also provide the special Devicetree labels &rpipico_spi_lcd and &lcd_panel for the special purpose of a on-shield LCD.

For shields with touchscreen support, additional GPIO signals and one I2C bus on the edge connector must also be free for communication with the touchscreen controller on the shield. Then the shields also provide the special Devicetree labels &rpipico_spi_tsc and &tsc_panel for this purpose.

For shields with TF/microSD card slot, even more GPIO signals on the edge connector must be free for communication with the card on the shield over SDHC/SPI. Then the shields also provide the special Devicetree labels &rpipico_spi_sdc and &sdhc_spi for this purpose. In case of the SDHC/SDIO mode up to seven additional GPIO signals must be free for communication with the card over a 4-bit SDHC/SDIO interface. But this is not yet supported and may need changes on the shield hardware.

Programming

Set -DSHIELD=geeekpi_pico_bb and use optional the USB Console Snippet (usb-console) when you invoke west build. For example:

Using west:

west build -b rpi_pico -p -S usb-console --shield "geeekpi_pico_bb" -d build/geeekpi_pico_bb-helloshell bridle/samples/helloshell
west flash -r uf2 -d build/geeekpi_pico_bb-helloshell

Using CMake and ninja:

# Use cmake to configure a Ninja-based buildsystem:
cmake -Bbuild/geeekpi_pico_bb-helloshell -GNinja -DBOARD=rpi_pico -DSHIELD=""geeekpi_pico_bb"" bridle/samples/helloshell

# Now run the build tool on the generated build system:
ninja -Cbuild/geeekpi_pico_bb-helloshell flash

Simple test execution on target

(text in bold is a command input)

uart:~$ hello -h
hello - say hello
uart:~$ hello
Hello from shell.
uart:~$ hwinfo devid
Length: 8
ID: 0x8c998be1de969148

uart:~$ kernel version
Zephyr version 4.0.0

uart:~$ bridle version
Bridle version 4.0.0

uart:~$ bridle version long
Bridle version 4.0.0.0

uart:~$ bridle info
Zephyr: 4.0.0
Bridle: 4.0.0-dev
uart:~$ device list
devices:
- clock-controller@40008000 (READY)
  DT node labels: clocks
- reset-controller@4000c000 (READY)
  DT node labels: reset
- snippet_cdc_acm_console_uart (READY)
  DT node labels: snippet_cdc_acm_console_uart
- uart@40034000 (READY)
  DT node labels: uart0 pico_serial rpipico_serial
- timer@40054000 (READY)
  DT node labels: timer
- gpio@40014000 (READY)
  DT node labels: gpio0
- adc@4004c000 (READY)
  DT node labels: adc pico_adc
- flash-controller@18000000 (READY)
  DT node labels: ssi
- pwm@40050000 (READY)
  DT node labels: pwm pico_pwm rpipico_pwm
- vreg@40064000 (READY)
  DT node labels: vreg
- rtc@4005c000 (READY)
  DT node labels: rtc
- pwm_leds (READY)
  DT node labels: pwm_leds
uart:~$ history
[  0] history
[  1] device list
[  2] bridle info
[  3] bridle version long
[  4] bridle version
[  5] kernel version
[  6] hwinfo devid
[  7] hello
[  8] hello -h

More Samples

Input dump

Prints all input events as defined by the shields Devicetree. See also Zephyr sample: Input dump.

Print the input events related to the on-shield touchscreen panel, the two user keys, and the two analog joystick achsises using the Input subsystem API. That are:

TSC : lvgl_pointer { input = &tsc_panel; };
XPT2046 : tsc_panel: &xpt2046_240x320 {};
0 : zephyr,code = <INPUT_KEY_0>;
1 : zephyr,code = <INPUT_KEY_1>;
2 : zephyr,code = <INPUT_KEY_2>;
3 : zephyr,code = <INPUT_KEY_3>;

Joystick simulation by longpress codes (≥1000㎳)

0 : short-code = <INPUT_KEY_RIGHT>;
1 : short-code = <INPUT_KEY_DOWN>;
2 : short-code = <INPUT_KEY_UP>;
3 : short-code = <INPUT_KEY_LEFT>;
0 : long-code = <INPUT_KEY_ENTER>;
1 : long-code = <INPUT_KEY_DOWN>;
2 : long-code = <INPUT_KEY_UP>;
3 : long-code = <INPUT_KEY_LEFT>;
west build -b rpi_pico -p -S usb-console --shield "geeekpi_pico_bb" -d build/geeekpi_pico_bb-input_dump zephyr/samples/subsys/input/input_dump
west flash -r uf2 -d build/geeekpi_pico_bb-input_dump

Simple logging output on target

***** delaying boot 4000ms (per build configuration) *****
W: BUS RESET
W: BUS RESET
*** Booting Zephyr OS build v4.0.0 (delayed boot 4000ms) ***
Input sample started
I: input event: dev=xpt2046@0            type= 3 code=  0 value=100
I: input event: dev=xpt2046@0            type= 3 code=  1 value=141
I: input event: dev=xpt2046@0        SYN type= 1 code=330 value=1
I: input event: dev=xpt2046@0        SYN type= 1 code=330 value=0
I: input event: dev=gpio_keys        SYN type= 1 code= 11 value=1
I: input event: dev=gpio_keys        SYN type= 1 code= 11 value=0
I: input event: dev=gpio_keys_longpress SYN type= 1 code=106 value=1
I: input event: dev=gpio_keys_longpress SYN type= 1 code=106 value=0
I: input event: dev=gpio_keys        SYN type= 1 code=  2 value=1
I: input event: dev=gpio_keys        SYN type= 1 code=  2 value=0
I: input event: dev=gpio_keys_longpress SYN type= 1 code=108 value=1
I: input event: dev=gpio_keys_longpress SYN type= 1 code=108 value=0
I: input event: dev=gpio_keys        SYN type= 1 code=  3 value=1
I: input event: dev=gpio_keys        SYN type= 1 code=  3 value=0
I: input event: dev=gpio_keys_longpress SYN type= 1 code=103 value=1
I: input event: dev=gpio_keys_longpress SYN type= 1 code=103 value=0
I: input event: dev=gpio_keys        SYN type= 1 code=  4 value=1
I: input event: dev=gpio_keys        SYN type= 1 code=  4 value=0
I: input event: dev=gpio_keys_longpress SYN type= 1 code=105 value=1
I: input event: dev=gpio_keys_longpress SYN type= 1 code=105 value=0
I: input event: dev=gpio_keys        SYN type= 1 code= 11 value=1
I: input event: dev=gpio_keys_longpress SYN type= 1 code= 28 value=1
I: input event: dev=gpio_keys        SYN type= 1 code= 11 value=0
I: input event: dev=gpio_keys_longpress SYN type= 1 code= 28 value=0
I: input event: dev=gpio_keys        SYN type= 1 code=  2 value=1
I: input event: dev=gpio_keys_longpress SYN type= 1 code=108 value=1
I: input event: dev=gpio_keys        SYN type= 1 code=  2 value=0
I: input event: dev=gpio_keys_longpress SYN type= 1 code=108 value=0
I: input event: dev=gpio_keys        SYN type= 1 code=  3 value=1
I: input event: dev=gpio_keys_longpress SYN type= 1 code=103 value=1
I: input event: dev=gpio_keys        SYN type= 1 code=  3 value=0
I: input event: dev=gpio_keys_longpress SYN type= 1 code=103 value=0
I: input event: dev=gpio_keys        SYN type= 1 code=  4 value=1
I: input event: dev=gpio_keys_longpress SYN type= 1 code=105 value=1
I: input event: dev=gpio_keys        SYN type= 1 code=  4 value=0
I: input event: dev=gpio_keys_longpress SYN type= 1 code=105 value=0

Sounds from the speaker

Drives an buzzer or speaker that must defined by the shields Devicetree. See also Bridle sample: Buzzer.

Using the PWM driver API with given Piezo Buzzer. That is:

PIEZO : aliases { pwm-buzzer0 = &pwm_buzzer_0; };
west build -b rpi_pico -p -S usb-console --shield "geeekpi_pico_bb" -d build/geeekpi_pico_bb-buzzer bridle/samples/buzzer
west flash -r uf2 -d build/geeekpi_pico_bb-buzzer

Simple test execution on target

  1. play a beep

  2. play a funky jingle

***** delaying boot 4000ms (per build configuration) *****
W: BUS RESET
W: BUS RESET
*** Booting Zephyr OS build v4.0.0 (delayed boot 4000ms) ***
[00:00:04.003,000] <inf> buzzersh: Buzzer shell is ready!
uart:~$ 
uart:~$ buzzer beep
uart:~$ buzzer play funkytown

LED color change

Drives an RGB LED that must defined by the shields Devicetree. See also Zephyr sample: PWM RGB LED.

Hint

The GeeekPi Pico Breadboard Kit doesn’t provide a TriColor ChipLED. This sample is not applicable.

LED strip test pattern

Drives an RGB LED strip that must defined by the shields Devicetree. See also Zephyr sample: LED strip.

Hint

The GeeekPi Pico Breadboard Kit doesn’t provide a RGB LED strip. This sample is not applicable.

LCD Orientation and Bit Order Test

Draw some basic rectangles onto the display. The rectangle colors and positions are chosen so that you can check the orientation of the LCD and correct RGB bit order. See also Zephyr sample: Display.

Using the Display driver API with chosen display. That is:

LCD : chosen { zephyr,display = &lcd_panel; };
ILI9341 : lcd_panel: &ili9341_320x240 {};
west build -b rpi_pico -p -S usb-console --shield "geeekpi_pico_bb" -d build/geeekpi_pico_bb-display_test zephyr/samples/drivers/display
west flash -r uf2 -d build/geeekpi_pico_bb-display_test
GeeekPi Pico Breadboard Kit Display Sample Animation

TOP LEFT, TOP RIGHT, BOTTOM RIGHT

Simple logging output on target

***** delaying boot 4000ms (per build configuration) *****
[00:00:00.357,000] <wrn> udc_rpi: BUS RESET
[00:00:00.437,000] <wrn> udc_rpi: BUS RESET
*** Booting Zephyr OS build v4.0.0 (delayed boot 4000ms) ***
[00:00:04.135,000] <inf> sample: Display sample for ili9341@0

LVGL Basic Sample

Displays “Hello World!” in the center of the screen and a counter at the bottom which increments every second. See also Zephyr sample: LVGL basic sample.

Using the LVGL module on top of the Display driver API and the Input subsystem API with chosen display and touchscreen panel. That is:

LCD : chosen { zephyr,display = &lcd_panel; };
ILI9341 : lcd_panel: &ili9341_320x240 {};
TSC : lvgl_pointer { input = &tsc_panel; };
XPT2046 : tsc_panel: &xpt2046_240x320 {};

Devicetree compatible

west build -b rpi_pico -p -S usb-console -S del-default-aliases --shield "geeekpi_pico_bb" -d build/geeekpi_pico_bb-lvgl_basic zephyr/samples/subsys/display/lvgl
west flash -r uf2 -d build/geeekpi_pico_bb-lvgl_basic

Simple test execution on target

***** delaying boot 4000ms (per build configuration) *****
[00:00:00.314,000] <wrn> udc_rpi: BUS RESET
[00:00:00.395,000] <wrn> udc_rpi: BUS RESET
*** Booting Zephyr OS build v4.0.0 (delayed boot 4000ms) ***
uart:~$ 
uart:~$ lvgl stats memory
Heap at 0x20001510 contains 2047 units in 11 buckets

  bucket#    min units        total      largest      largest
             threshold       chunks      (units)      (bytes)
  -----------------------------------------------------------
        0            1            2            1            4
        1            2            1            2           12
        6           64            1           81          644
       10         1024            1         1336        10684

11348 free bytes, 4520 allocated bytes, overhead = 512 bytes (3.1%)

LVGL Widgets Demo

Shows how the widgets look like out of the box using the built-in material theme. See also Zephyr sample: LVGL demos.

Using the LVGL module on top of the Display driver API and the Input subsystem API with chosen display and touchscreen panel. That is:

LCD : chosen { zephyr,display = &lcd_panel; };
ILI9341 : lcd_panel: &ili9341_320x240 {};
TSC : lvgl_pointer { input = &tsc_panel; };
XPT2046 : tsc_panel: &xpt2046_240x320 {};

Devicetree compatible

west build -b rpi_pico -p -S usb-console -S del-default-aliases --shield "geeekpi_pico_bb" -d build/geeekpi_pico_bb-lvgl_demos zephyr/samples/modules/lvgl/demos -- -DCONFIG_LV_Z_DEMO_WIDGETS=y
west flash -r uf2 -d build/geeekpi_pico_bb-lvgl_demos

Note

Resistive touchscreens have low sensitivity. This example can therefore only be accessed with significant restrictions.

GeeekPi Pico Breadboard Kit Widgets Demo

Simple test execution on target

***** delaying boot 4000ms (per build configuration) *****
[00:00:00.425,000] <wrn> udc_rpi: BUS RESET
[00:00:00.508,000] <wrn> udc_rpi: BUS RESET
*** Booting Zephyr OS build v4.0.0 (delayed boot 4000ms) ***
uart:~$ 
uart:~$ lvgl stats memory
Heap at 0x20001650 contains 6143 units in 13 buckets

  bucket#    min units        total      largest      largest
             threshold       chunks      (units)      (bytes)
  -----------------------------------------------------------
        0            1           30            1            4
        1            2            7            3           20
        2            4            1            7           52
        3            8            1           15          116
        4           16            4           31          244
        6           64            1           81          644
       10         1024            1         1915        15316

17116 free bytes, 28460 allocated bytes, overhead = 3572 bytes (7.3%)

TF/microSD Demonstration

This samples and test applications aren’t applicable on all boards. They will be built with activated USB-CDC/ACM console.

Hint

The GeeekPi Pico Breadboard Kit doesn’t provide a TF/microSD card slot. This sample is not applicable.

References