From Waveshare Wiki
Jump to: navigation, search

4-Digit 8-Segment Display Module For Raspberry Pi Pico, SPI-Compatible





  • SPI-compatible, easy to drive.
  • Onboard high precision RTC chip DS3231, with backup battery holder.
  • Standard Raspberry Pi Pico header, supports Raspberry Pi Pico series.


  • Operating voltage: 5V
  • Working current: 30mA
  • Digits: 4
  • Display size: 0.4inch
  • LED color: red
  • Driver: 74HC595
  • Display part No.: FJ4401AH
  • Dimensions: 21(H)x 52.00(V) mm



Digital tube and controller

74HC595 is a high-speed CMOS 8-bit 3-state shift register/output latch chip, using CMOS silicon gate technology. The device contains an 8-bit serial input and parallel output shift register and provides an 8-bit D-type storage register with an 8-bit 3-state output. Provide independent clock signals to the shift register and storage register. The shift register has a direct clearing function, serial input and output functions, and cascade applications. (Using standard pins.) Both shift registers and storage registers use a positive Edge clock trigger, if these two clocks are connected together, the shift register is always the previous clock pulse of the storage register. All input ports are equipped with anti-static and instant overvoltage protection circuits.
LED color: red
Circuit connection type: Negative
Display size: 0.4inch



Pico User Guide

Hardware connection

Please take care of the direction when you connect Pico, an USB port is printed to indicate . You can also check the pin of Pico and the LCD board when connecting.
You can connect display according to the table.

LCD Pico Description
VCC VSYS Power input
DIN GP11 Serial data input
CLK GP10 Data input clock pin
RCLK GP9 Output latch register clock pin



Setup environment

Please refer to Raspberry Pi's guide: https://www.raspberrypi.org/documentation/pico/getting-started/

Download example

1. Open a terminal of Raspberry Pi

sudo apt-get install p7zip-full
cd ~
sudo wget  https://www.waveshare.com/w/upload/2/28/Pico_code.7z
7z x Pico-8SEG-LED-Code.7z -o./Pico-8SEG-LED-Code
cd ~/Pico-8SEG-LED-Code
cd c/build/

Raspberry Pi

  • Open a terminal and got to the C directory
cd ~/Pico_code/c/
  • Create build folder and add path of SDK to it, it is ../../pico-sdk by default, however, it may be different for different users, please check the actual path of your pico.
cd build
export PICO_SDK_PATH=../../pico-sdk
  • run cmake to generate Makefile, and build it.
cmake ..
make -j9
  • A main.uf2 file is generated.
  • Hold the BOOTSEL button of Pico, and connect the USB interface of Pico to Raspberry Pi then release the button.
  • Copy the main.uf2 file to the RPi-RPI2 drive recognized.

Python codes

Use in Windows

  • 1. Press and hold the BOOTSET button on the Pico board, connect the pico to the USB port of the computer through the Micro USB cable, and release the button after the computer recognizes a removable hard disk (RPI-RP2).
  • 2. Copy the rp2-pico-20210418-v1.15.uf2 file in the python directory to the recognized removable disk (RPI-RP2).
  • 3. Open Thonny IDE (Note: Use the latest version of Thonny, otherwise there is no Pico support package, the latest version under Windows is v3.3.3).
  • 4. Click Tools->Settings->Interpreter, select Pico and the corresponding port as shown in the figure.


  • 5. File -> Open -> the corresponding .py file, click to run, as shown in the following figure:

This demo provides a simple program...

Run in Raspberry Pi

  • Hold the BOOTSET key of the Pico board, then connect the Pico to Raspberry Pi by USB cable, then release the key.
  • Once the removable disk (RPI-RPI2) is recognized, copy the rp2-pico-20210418-v1.15.uf2 file to pico.
  • Open the Thonny IDE in Raspberry Pi, update it if it doesn't support Pico.
  • Configure the port by choosing MicroPython(Raspberry Pi and ttyACM0 port) in Tools -> Options... -> Interpreter.

If your Thonny doesn't support Pico, you can update it with the following command:

sudo apt upgrade thonny
  • Choose File->Open...->python/ and select the corresponding .py file to run the codes

Codes Description


Buttom interface

In DEV_Config.c(.h) file (...\c\lib\Config)

  • Data type:
#define UBYTE   uint8_t
#define UWORD   uint16_t
#define UDOUBLE uint32_t
  • Mpdule initializes and exit:
void DEV_Module_Init(void);
void DEV_Module_Exit(void);
1. These are functions that are used to handle GPIO:
  • GPIO Write/read:
void 	DEV_Digital_Write(UWORD Pin, UBYTE Value);
UBYTE 	DEV_Digital_Read(UWORD Pin);
  • SPI write byte
void DEV_SPI_WriteByte(UBYTE Value);



Demo codes

Development Software

Pico Quick Start

Download Firmware

  • MicroPython Firmware Download

MicroPython Firmware Download.gif

  • C_Blink Firmware Download

C Blink Download.gif

Video Tutorial

  • Pico Tutorial I - Basic Introduction

  • Pico Tutorial II - GPIO

  • Pico Tutorial III - PWM

  • Pico Tutorial IV - ADC

  • Pico Tutorial V - UART

  • Pico Tutorial VI - To be continued...

MicroPython Series

C/C++ Series

Arduino IDE Series

Environment Building

  • Open Arduino IDE, and enter File -> Preferences.
  • In the pop-up dialog box, enter the following URL in the "Additional Boards Manager URLs" field:
  • Click "OK" to close the dialog box.
  • Enter IDE Tool -> Dev Board Manager.
  • Type "pico" in the search box and select "Add".

Pico-W Series Tutorial (To be continued...)

Open Source Demo


If you require technical support, please go to the Support page and open a ticket.