Pico-8SEG-LED
| ||
Overview
Features
- 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.
Specification
- 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
Pinout
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.
Digits:4
LED color: red
Circuit connection type: Negative
Display size: 0.4inch
Timing
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 |
GND | GND | GND |
DIN | GP11 | Serial data input |
CLK | GP10 | Data input clock pin |
RCLK | GP9 | Output latch register clock pin |
Connection
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://files.waveshare.com/upload/9/94/Pico-8SEG-LED-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 go to the C directory:
cd ~/Pico-8SEG-LED-Code/c/
- Create a build folder and add the 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, and 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
- 1. The process of firmware flashing is the same as on Windows, you can choose to copy the pico_micropython_20210121.uf2 file into pico on a PC or Raspberry Pi.
- 2. Open the Thonny IDE on the Raspberry Pi (click Raspberry logo -> Programming -> Thonny Python IDE), you can check the version information in Help -> About Thonny.
- To make sure your version has the Pico support package, also you can click on Tools -> Options... -> Interpreter to select MicroPico. -> Interpreter to select MicroPython (Raspberry Pi Pico and ttyACM0 port).
As shown in the image:
If your Thonny doesn't support Pico, you can update it with the following command:
sudo apt upgrade thonny
- Choose File -> Open...-> python/Pico-8SEG-LED/Pico-8SEG-LED.py, and select the corresponding .py file to run the codes.
Codes Description
C
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); Note: 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);
Resource
Document
Demo codes
Development Software
- Zimo221.7z
- Image2Lcd.7z
- Font Library Tutorial
- Image Extraction Tutorial
- Thonny Python IDE (Windows V3.3.3)
Pico Quick Start
Firmware Download
Text Tutorial
Introduction
MicroPython Series
- 【MicroPython】 machine.Pin Function
- 【MicroPython】 machine.PWM Function
- 【MicroPython】 machine.ADC Function
- 【MicroPython】 machine.UART Function
- 【MicroPython】 machine.I2C Function
- 【MicroPython】 machine.SPI Function
- 【MicroPython】 rp2.StateMachine
C/C++ Series
For C/C++, it is recommended to use Pico VS Code for development. This is a Microsoft Visual Studio Code extension designed to make it easier for you to create, develop, and debug projects for the Raspberry Pi Pico series development board. Whether you are a beginner or an experienced professional, this tool can help you confidently and easily develop Pico. Below we will introduce how to install and use the extension.
- Official website tutorial: https://www.raspberrypi.com/news/pico-vscode-extension/.
- This tutorial is applicable to Raspberry Pi Pico, Pico2, and our company's RP2040 and RP2350 series development boards.
- The development environment defaults to Windows as an example. For other environments, please refer to the official website tutorial for installation.
Arduino IDE Series
Install Arduino IDE
-
Download the Arduino IDE installation package from Arduino website.
-
Just click on "JUST DOWNLOAD".
-
Click to install after downloading.
-
Note: You will be prompted to install the driver during the installation process, we can click Install.
Install Arduino-Pico Core on Arduino IDE
-
Open Arduino IDE, click the File on the left corner and choose "Preferences".
-
Add the following link in "Additional boards manager URLs", then click OK.
https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json
Note: If you already have the ESP32 board URL, you can separate the URLs with commas like this:https://dl.espressif.com/dl/package_esp32_index.json,https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json
-
Click on Tools -> Board -> Board Manager -> Search for pico, it shows installed since my computer has already installed it.
Upload Demo At the First Time
-
Press and hold the BOOTSET button on the Pico board, connect the Pico to the USB port of the computer via the Micro USB cable, and release the button when the computer recognizes a removable hard drive (RPI-RP2).
- Download the demo from #Resource, open the D1-LED.ino under arduino\PWM\D1-LED path.
-
Click Tools -> Port, remember the existing COM, do not need to click this COM (different computers show different COM, remember the existing COM on your computer).
-
Connect the driver board to the computer with a USB cable, then click Tools -> Ports, select uf2 Board for the first connection, and after the upload is complete, connecting again will result in an additional COM port.
-
Click Tools -> Board -> Raspberry Pi Pico/RP2040 -> Raspberry Pi Pico.
-
After setting, click the right arrow to upload.
- If you encounter problems during the period, you need to reinstall or replace the Arduino IDE version, uninstall the Arduino IDE clean, after uninstalling the software you need to manually delete all the contents of the folder C:\Users\[name]\AppData\Local\Arduino15 (you need to show the hidden files in order to see it) and then reinstall.
Open Source Demo
Support
Technical Support
If you need technical support or have any feedback/review, please click the Submit Now button to submit a ticket, Our support team will check and reply to you within 1 to 2 working days. Please be patient as we make every effort to help you to resolve the issue.
Working Time: 9 AM - 6 PM GMT+8 (Monday to Friday)