This is a 8X24 LED dot matrix display module that can be used to display characters and graphics and it is simple to control it.
Each dot matrix is controlled by a Max7219
The MAX7219/MAX7221 are compact, serial input/out-put common-cathode display drivers that interface microprocessors (μPs) to 7-segment numeric LED dis-plays of up to 8 digits, bar-graph displays, or 64 individual LEDs.
Included on-chip are a BCD code-B decoder, multiplex scan circuitry, segment and digit drivers, and an 8×8 static RAM that stores each digit.Only one external resistor is required to set the segment current for all LEDs. The MAX7221 is compatible with SPI™, QSPI™, and MICROWIRE™, and has slew-rate-limited segment drivers to reduce EMI.
A convenient 4-wire serial interface connects to all common μPs. Individual digits may be addressed and updated without rewriting the entire display. The MAX7219/MAX7221 also allow the user to select code-B decoding or no-decode for each digit.
The devices include a 150μA low-power shutdown mode, analog and digital brightness control, a scan-limit register that allows the user to display from 1 to 8 digits, and a test mode that forces all LEDs on.
Parts List
Name | Link |
Features:
– Compatibility: Compatible for Arduino UNO R3 / Mega2560.
– Resolution: 8 * 24
– LED matrix type: Common cathode
– LED color: Red
– Display size: 0.8 * 2.4inch (20 * 60mm)
– LED size: 1.9mm
– Cascadable: Yes
– Driver IC: MAX7219
– Working voltage: 4.5-5.3V
– Working current: 160mA(MAX)
– Interface logic voltage: 5V
– Interface type: SPI
Schematic
There is a schematic available
Code
You need to install the Adafruit GFX library and the Max72xxPanel library
The Adafruit library is available from the library manager
[codesyntax lang=”cpp”]
#include <SPI.h> #include <Adafruit_GFX.h> #include <Max72xxPanel.h> int pinCS = 10; // Attach CS to this pin, DIN to MOSI and CLK to SCK int numberOfHorizontalDisplays = 1; int numberOfVerticalDisplays = 3; Max72xxPanel matrix = Max72xxPanel(pinCS, numberOfHorizontalDisplays, numberOfVerticalDisplays); String txtDisplay = "GETMICROS"; int width = 5 + 1; // The font width is 5 pixels void setup() { matrix.setIntensity(2); // Use a value between 0 and 15 for brightness matrix.setPosition(0, 0, 0); // The first display is at <0, 0> matrix.setPosition(1, 0, 1); // The second display is at <1, 0> matrix.setPosition(2, 0, 2); // The third display is at <2, 0> matrix.setRotation(1); // The same hold for the last display matrix.fillScreen(LOW); matrix.write(); delay(400); matrix.print("TEST"); matrix.write(); delay(2000); } void loop() { for ( int i = 0 ; i < width * txtDisplay.length() + matrix.width() - 1 - 1; i++ ) { matrix.fillScreen(LOW); int letter = i / width; int x = (matrix.width() - 1) - i % width; int y = (matrix.height() - 8) / 2; // center the text vertically while ( x + width - 1 >= 0 && letter >= 0 ) { if ( letter < txtDisplay.length() ) { matrix.drawChar(x, y, txtDisplay[letter], HIGH, LOW, 1); } letter--; x -= width; } matrix.write(); // Send bitmap to display delay(100); } }
[/codesyntax]