See video and dmd_multicolor example for details.
Attention! Recent versions are incompatibe with code prior v1.0.0 The main difference from 0.x.x versions is a new panel template format. You can see a brief explanation in the Wiki/About matrix patterns and in the comments of the DMD_Panel_Templates.h file.
Last version with old panel templates v0.9.5
The library initially started out as STM32 port of Freetronics DMD library (https://github.com/freetronics/DMD). Now it has grown into a separate project with support for different types of monochrome, two-color and RGB panels.
One of the important features of the library is support of Adafruit GFX format fonts: https://learn.adafruit.com/adafruit-gfx-graphics-library/using-fonts. Using Adafruit fontconvert
utility allows users to convert and display on DMD matrix Truetype fonts, including Unicode fonts with national characters of almost any language. The library includes Cyrillic and Turkish fonts. For using of national fonts, see the examples dmd_rgb.ino
and dmd_rgb_turk.ino
(Turkish).
The nain advantage of the library, which distinguishes it from its analogues, is the very wide range of supported RGB panels. Modules of almost any size, multiplexing type and scanning paterrn can be used. All these are configured by "matrix pattern" - a strings of digits, represents a key characteristics of given panel. The library does provide to users a rich set of predefined matrix patterns, and if some panel is missing from the list, it can be easily added without changing the main library code.
Description | Interface | Pixels | Scan | Code module |
---|---|---|---|---|
Monochrome P10 panels | HUB12 | 32x16 | 1/4 | DMD_Monochrome_SPI.h DMD_Parallel.h |
Indoor RGB | HUB75 | 32x16 | 1/8 | DMD_RGB.h |
32x32 | 1/16 | |||
64x32 | 1/16 | |||
64x64 | 1/32 | |||
80x40 | 1/20 | |||
128x64 | 1/32 | |||
Outdoor RGB | HUB75 | 32x16 | 1/2 1/4 1/8 | DMD_RGB.h |
Two-color indoor | HUB08 | 64x32 | 1/16 | DMD_RGB.h (work as RGB) |
RGB with FM6126a driver | HUB75 | 64x32 | 1/16 | DMD_RGB_6126a.h |
RGB ICDN2153/FM6353/6363 S-PWM | HUB75 | 128x64 | 1/32 | DMD_RGB_6353.h |
64x32 | 1/16 |
Read more about supported panels in the Wiki/Supported panels. The set of supported matrices is constantly updated.
Adding a new panels to the library
If your panel is not supported by the library yet, please feel free to open an issue using template
- The graphics subsystem is inherited from Adafruit GFX library https://github.com/adafruit/Adafruit-GFX-Library
- Dual memory buffering for reducing scanning artefacts and making some visual effects (see Wiki/Examples).
- Two color modes for RGB: highcolor RGB444 and low memory consuming RGB111 mode for LED signs, information boards etc.
- Multicolor strings for fixed text and scrolling (since v1.1.2)
- Chaining up to 100 panels for Monochrome (46 tested) or 16 for RGB 64x32. The number of matrices is limited by the size of the controller memory.
- For monochrome display - a new "Parallel" connection scheme, in which each horizontal row of panels is connected to a separate R_DATA pin
- STM32F1 - STM32F103C8 (bluepill) and STM32F103C6 boards tested
- STM32F4 - STM32F401CC and STM32F411CE boards
- Raspberry Pi Pico and other RP2040-based boards
There are two ways to install the library:
- Download ZIP-archive directly from Releases section, open your Arduino IDE, click on
Sketch > Include Library > Add . ZIP Library
. Choose the zip file you just downloaded. - Using Library Manager (since Arduino IDE 1.6.2): navigate to
Sketch > Include Library > Manage Libraries
inside your Arduino IDE and search for the library, then clickInstall
.
-
Adafruit_GFX library
DMD_STM32a project requires Adafruit GFX library
-
STM32
The only Roger Clarks's repo https://github.com/rogerclarkmelbourne/Arduino_STM32 is supported for STM32 based boards on Arduino IDE.
Please note that Clark's repo versions prior d05a128 (28 Apr 2024) is incompatible with recent Adafruit GFX library. Use Adafruit GFX version prior to 1.8.0 (v1.7.0 is OK) https://github.com/adafruit/Adafruit-GFX-Library/releases/tag/1.7.0
-
Raspberry Pi Pico
This code requires Earle Philhower core https://github.com/earlephilhower/arduino-pico
For detailed info about matrix connection see Wiki:
Consult the examples for recommended pin combinations.
- Using of dual buffereng to show fixed and scrolling text https://youtu.be/DoOcfGb0PLw
- Multicolor fixed and scrolling text https://youtu.be/lw87UqoO50E
- Some other videos are avaliable at the page of old version of library.
Sometimes wiring can be tricky so here I will put links to useful PCB-boards for use with this code (are not affiliated with the DMD_STM32)
- DMD-STM32 Shield for P10 Monochrome LED Matrix Panel Designed by LIGHTWELL in Bulgaria
(22 Dec 2023 - v1.1.2) - Introduced multicolor for fixed and scrolling text
(30 Nov 2023 - v1.1.0) - Add support of panels with FM6353/6363 S-PWM drivers
(25 Mar 2023 - v1.0.4) - Add support of panels with FM6126a chip
(12 Feb 2023 - v1.0.0) - New panel template model with multiparameter specialization
(16 Sep 2022 - v0.9.0) - Add support of RP2040-based boards and using the DMA in the RGB modes for STM32F4 boards
(10 Jul 2022 - v0.8.0) - Add support of STM32F4 blackpills - STM32F401CC & STM32F411CE (Custom STM32 repo required! see below)
(19 Feb 2022 - v0.7.0) - Add support of "Outdoor" RGB panels with 1/2 1/4 1/8 scans
For full version history see CHANGES.txt
- Evgeny Fokin for testing and provided matrices.
- Eduard Yansapov - for testing.
- @bilalibrir - for help with the code for Outdoor RGB matrix
- Initial version of STM32 specific code based on DMDSTM by Evgen Mozok: https://github.com/mozok/DMDSTM
- The principles of handling RGB matrices are based on Adafruit RGB-matrix-Panel library https://github.com/adafruit/RGB-matrix-Panel, with a changes, necessary to port code to STM32 controllers.
- Some other code solutions are inspired by PxMatrix and ESP32-HUB75-MatrixPanel-I2S-DMA libraries
This software is experimental and a work in progress. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND.