Demo Video: [Link]
This project provides a driver for a 64x32 RGB LED matrix, utilizing the NuMaker Uno 131 microcontroller. It is adapted from the LED-Matrix-Display-Driver-Library STM32 to function seamlessly with the NuMaker platform. With minor modifications, this library can be compatible with various other microcontrollers.
- Microcontroller: NuMaker 131 Uno
- Driver and GPIO are managed using the "NUC131Series_BSP_CMSIS_v3.00.004" and are set directly to the register level.
- Display Specifications:
- Resolution: 64x32 pixels
- Color Depth: RGB332
- Hue Levels: 4 each for Red, Green, and Blue channels
Note: To adapt this driver for different RGB formats or display sizes, you'll need to recalculate the buffer size and modify the display functions accordingly.
Note: If you want SD Card support, you can look at ChaN's FatFS.
For users employing the NuMaker 131 Uno board, the following GPIO pin configuration is recommended:
| Line | GPIO Pin |
|---|---|
| R0 | PF4 |
| G0 | PF5 |
| B0 | PA10 |
| GND | GND PIN |
| R1 | PA11 |
| G1 | PA15 |
| B1 | PE5 |
| GND | GND PIN |
| A | PA0 |
| B | PA1 |
| C | PA2 |
| D | PA3 |
| CLK | PB11 |
| LAT | PA14 |
| OE | PA13 |
| GND | PA12 |
The pin setting funnction in DisplayInit() function is defined by "NUC131Series_BSP_CMSIS_v3.00.004", which can be found in the NuVoton's website
Before running the code, ensure you have installed the required board package:
- Open Arduino IDE.
- Navigate to Tools → Board Manager.
- Search for NuMaker UNO and install it.
Follow these steps to run an example sketch:
- Create a new directory with the same name as the example file (
example/_____.ino). - Copy the
_____.inofile into the newly created directory. - Copy all files from the
src/directory into the same directory. - Open the
.inofile in the Arduino IDE and upload the code to the board.
To display an image on the LED matrix:
- Convert your image file to .bmp format.
- Use
bmp2h.pyto convert the BMP file into a byte array (.h) file. - Include the generated
.hfile in your.inosketch. - Call the
displayLoadImage()function to load and display the image.
The process of adding a new font style follows the same logic as displaying an image:
- Convert the font data into a compatible byte array.
- Include the generated
.hfile in your project. - Modify the display function to support the new font style.