The MAX7219/MAX7221 are compact, serial input/output common-cathode display drivers that interface microprocessors (µPs) to 7-segment numeric LED displays 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.
Features
● 10MHz Serial Interface
● Individual LED Segment Control
● Decode/No-Decode Digit Selection
● 150μA Low-Power Shutdown (Data Retained)
● Digital and Analog Brightness Control
● Display Blanked on Power-Up
● Drive Common-Cathode LED Display
Here is a picture of a typical module that can be bought from many sources, including the link at the end of the article
Parts List
Here are the parts I used
| Name | Links | |
| Wemos Mini | ||
| MAX7219 |
|
|
| Connecting cables |
Schematics

Code
You will need the library from https://github.com/squix78/MAX7219LedMatrix
#include <SPI.h>
#include "LedMatrix.h"
#define NUMBER_OF_DEVICES 1
#define CS_PIN D4
LedMatrix ledMatrix = LedMatrix(NUMBER_OF_DEVICES, CS_PIN);
void setup()
{
ledMatrix.init();
ledMatrix.setIntensity(4); // range is 0-15
ledMatrix.setText("The quick brown fox jumps over the lazy dog");
}
void loop()
{
ledMatrix.clear();
ledMatrix.scrollTextLeft();
ledMatrix.drawText();
ledMatrix.commit();
delay(200);
}
Link
https://www.analog.com/media/en/technical-documentation/data-sheets/MAX7219-MAX7221.pdf

Hello guy’s,
at first I have to say that I am a beginner. I read these instruction but I am confused.
Schematics show connection to 3.3 V. Specification of LED Matrix from MAX7219 say’s it works with
Operating Voltage: DC 4.7V – 5.3V
Typical Voltage: 5V
Operating Current: 320mA
Max Operating Current: 2A
my questions:
– why using 3.3V (and not 5V)
– If I use power from Wemos D1 can these kill my board because
board can’t support so muh mA for MAX7219 ?
Thx
i created a little 8×8 matrix script to ‘draw’ a graphic and get the code to use it with:
https://github.com/squix78/MAX7219LedMatrix
check it out here:
http://codepen.io/infested_one/pen/egebPx