MAX7219 LED Matrix

A serial-input common-cathode LED driver IC paired with an 8x8 dot-matrix, controlling all 64 LEDs over three signal wires.

  • Operating supply voltage (V+)4.0 to 5.5V (5V nominal)
  • Max peak segment current40mA (set by RSET, min 9.53k ohm)
  • LEDs driven per IC64 (one 8x8 matrix) or up to 8 digits
  • Serial interface4-wire (DIN, CLK, LOAD/CS, DOUT), 10MHz max clock
MAX7219 LED Matrix, A serial-input common-cathode LED driver IC paired with an 8x8 dot-matrix, controlling all 64 LEDs over three signal wires.
In short

The MAX7219 8x8 matrix module drives 64 LEDs from three signal pins, DIN, CLK and CS (LOAD), and chains through DOUT to the next module (Maxim MAX7219 datasheet, p. 5). The MAX7219 needs a 4.0 V to 5.5 V supply and its inputs read high from 3.5 V (datasheet, pp. 2 to 3), so power it from 5 V. A fully lit module can draw about 330 mA (p. 2), so chains of several modules want their own 5 V supply.

The MAX7219 LED matrix module combines the Maxim/Analog Devices MAX7219 display driver IC with an 8x8 dot-matrix of 64 LEDs on a small carrier PCB. The driver handles multiplex scanning, per-segment control, brightness, and (for 7-segment use) BCD decoding entirely on-chip, so the microcontroller only shifts display data in over a simple serial link. A single external resistor sets the peak segment current for every LED.

Control uses three signal lines, DIN, CLK and LOAD/CS, plus VCC and GND. The shift register clocks at up to 10 MHz (MAX7219 datasheet, p. 1). A DOUT pin lets modules daisy-chain, so one to four (or more) 8x8 modules can be strung together and driven from the same three signal lines, which is why these are sold as single, dual, and quad matrix strips.

On-chip control registers provide digital brightness in 16 steps, a scan-limit register to display 1 to 8 digits (or rows), an optional code-B decode mode for 7-segment digits, a display-test mode that forces all LEDs on, and a 150 µA low-power shutdown that retains the display data. The part drives common-cathode displays and is specified for a 4.0 V to 5.5 V supply (datasheet, pp. 1 to 2). The FC-16 style module puts the chip, its current-setting resistor and the 8x8 matrix on one board with input and output headers for chaining.

MAX7219 LED Matrix pinout

tinkered.ai/components/max7219-matrixMAX7219 LED MatrixVCC_INPowerGND_INGroundDINDigital · SPI MOSICS_INDigital · SPI CSCLK_INDigital · SPI SCKVCC_OUTVCC (out)GND_OUTGroundDOUTDigital · SPI MISOCS_OUTDigital · SPI CSCLK_OUTDigital · SPI SCK
PinFunctionType
VCC_INVCC (in)5 V (max 5.5 V)power in
GND_INGND (in)power in
DINDigital, SPI MOSIinput
CS_INDigital, SPI CSinput
CLK_INDigital, SPI SCKinput
VCC_OUTVCC (out)free
GND_OUTGND (out)free
DOUTDigital, SPI MISOfree
CS_OUTDigital, SPI CSfree
CLK_OUTDigital, SPI SCKfree

How to wire the MAX7219 LED Matrix

Pin by pin, for the board you have.

MAX7219 LED MatrixArduino UnoNote
VCC_IN5V
GND_INGND
DIND11
CLK_IND13
CS_IND10
Open this circuit on an Arduino UnoThe full Arduino Uno guide

MAX7219 LED Matrix code

Every example here compiles for its board.

Libraries: wayoda/LedControl
// MAX7219 LED Matrix on Arduino Uno: wiring and a free simulation at https://www.tinkered.ai/components/max7219-matrix
#include <LedControl.h>
// LedControl(DIN, CLK, CS, numDevices): Uno: MOSI=11, SCK=13, SS=10
LedControl lc = LedControl(11, 13, 10, 1);
void setup() {
  lc.shutdown(0, false);   // wake from power-saving
  lc.setIntensity(0, 8);   // brightness 0–15
  lc.clearDisplay(0);
}
void loop() {
  for (int row = 0; row < 8; row++) {
    lc.setRow(0, row, 0xFF);   // light the whole row
    delay(120);
    lc.setRow(0, row, 0x00);
  }
}
Compiled for arduino:avr:uno on 2026-10-30

Before you wire it

Do
  • Power from 5V (VCC_IN), common GND. One module draws up to about 330 mA fully lit: fine on Arduino 5V, but for many modules prefer an external 5V supply + common GND.
  • Wire the input header to the MCU: DIN ← MCU data pin, CLK ← clock pin, CS ← load/latch pin. Pick any 3 free digital pins.
  • Data is a 16-bit frame, MSB first: D11..D8 = register address, D7..D0 = data. Latched on the CS rising edge.
  • To chain modules, wire this module's DOUT/CS_OUT/CLK_OUT to the next module's DIN/CS/CLK; the controller shifts N×16 bits per CS pulse.
  • Any library works: LedControl (bit-banged) and MD_MAX72XX/MD_Parola (hardware SPI) are both decoded. Declare the same device count in the firmware as the part has: max7219-8x8-{N} → MAX_DEVICES = N.
Don’t
  • No leaving CS unconnected: without a latch pulse nothing ever displays.
  • No wiring data into DOUT (DOUT is the chain-out to the next module).
  • No expecting decode mode (BCD) to work: matrices use no-decode (raw column bits per row); only 7-segment setups use BCD decode.
  • Never drive it from 3.3 V logic without a level shifter: the MAX7219 needs 3.5 V for a high
  • Powers from a 4.0 V to 5.5 V rail; wire VCC to 5 V and share a common GND. Do not run the driver from 3.3 V: that is below its 4.0 V minimum supply (MAX7219 datasheet, p. 2).
  • Control needs only three signal lines (DIN, CLK, LOAD/CS) plus V+ and GND, regardless of how many modules are chained.
  • The logic-high input threshold (VIH) is 3.5 V minimum (MAX7219 datasheet, p. 3), so 5 V logic is ideal. A 3.3 V microcontroller (ESP32, Pi Pico, STM32) sits below the guaranteed high level; it often works on the bench, but a 74HCT-family buffer or level shifter on DIN, CLK and CS makes it reliable.
  • The ISET pin connects to V+ through the RSET resistor, which sets the peak segment current for all LEDs; module boards ship this resistor on board. Its minimum value is 9.53 kΩ, which typically sets 40 mA per segment (datasheet, p. 8); going lower pushes current past the 40 mA rating.
  • To cascade, wire each module's DOUT to the next module's DIN and bus CLK and LOAD/CS to all of them. Data appears at DOUT 16.5 clock cycles after it enters DIN (datasheet, p. 5), so the host must clock 16 bits per chained device before latching.
  • The IC drives common-cathode displays; the on-board matrix is already wired to match, so use a MAX7219 library and select the correct hardware/orientation type for your specific module version.
  • For matrix use, set the decode-mode register to no-decode (0x00); the code-B BCD decoder is only for 7-segment digits and will otherwise render font glyphs instead of individual pixels.
  • A MAX7219 with every segment lit at 40 mA draws about 330 mA (datasheet, p. 2); when chaining several modules, power them from an external 5 V supply rather than the Arduino's onboard regulator to avoid brownouts. Maxim recommends a 10 µF electrolytic and a 0.1 µF ceramic capacitor between V+ and GND close to the chip (p. 10).

Specifications

Operating supply voltage (V+)
4.0 to 5.5V (5V nominal)Maxim MAX7219/MAX7221 datasheet 19-4452 Rev 4, p. 2
Max peak segment current
40mA (set by RSET, min 9.53k ohm)Maxim MAX7219/MAX7221 datasheet 19-4452 Rev 4, pp. 5, 8
LEDs driven per IC
64 (one 8x8 matrix) or up to 8 digitsMaxim MAX7219/MAX7221 datasheet 19-4452 Rev 4, p. 1
Serial interface
4-wire (DIN, CLK, LOAD/CS, DOUT), 10MHz max clockMaxim MAX7219/MAX7221 datasheet 19-4452 Rev 4, pp. 1, 5
Digital brightness control
16 steps via intensity registerMaxim MAX7219/MAX7221 datasheet 19-4452 Rev 4, p. 8
Scan-limit range
1 to 8 digitsMaxim MAX7219/MAX7221 datasheet 19-4452 Rev 4, p. 9
Logic-high input threshold (VIH)
3.5V minMaxim MAX7219/MAX7221 datasheet 19-4452 Rev 4, p. 3
Operating supply current
330 mA typ with all segments and decimal points on at 40 mAMaxim MAX7219/MAX7221 datasheet 19-4452 Rev 4, p. 2
Shutdown supply current
150uA (data retained)Maxim MAX7219/MAX7221 datasheet 19-4452 Rev 4, p. 2
IC package
24-pin DIP or SOMaxim MAX7219/MAX7221 datasheet 19-4452 Rev 4, p. 1
Supply voltage
5 V
Maximum supply voltage
5.5 V
Interface
SPI
Dimensions
32 × 32 × 12 mm
Weight
8 g

From the Maxim Integrated's datasheet, published by Maxim Integrated.

Common mistakes

  1. Leaving decode mode enabled for a matrix

    On a matrix you must write 0x00 to the decode-mode register (0x09) (MAX7219 datasheet, p. 7). If code copied from a 7-segment example turns the code-B BCD decoder on, the driver interprets your pixel data as 7-segment font digits and the display shows garbage instead of the dots you set.

  2. Forgetting shutdown and scan-limit setup

    On power-up the MAX7219 is in shutdown with the display blanked and scans only one digit (datasheet, p. 7). If you never write the shutdown register to normal operation and set the scan-limit register to all 8 digits, the panel stays dark or lights only a few rows even though your data is loading.

  3. Under-powering a chain of modules

    Each fully lit 8x8 module can draw about 330 mA at 40 mA per segment (datasheet, p. 2). Chaining four modules off the 5V pin of a USB-powered Arduino can brown out the board; use a dedicated 5V supply and common ground.

  4. Wrong or missing RSET resistor

    With the ISET pin left open (no RSET) there is no segment current and the display stays dark. Fitting a resistor below the 9.53 kΩ minimum drives segments past their 40mA rating, risking LED and driver damage. Keep the on-board resistor or adjust brightness digitally via the intensity register instead.

  5. Scrambled or mirrored output when chaining

    Generic MAX7219 modules differ in physical LED orientation and row/column mapping. Selecting the wrong hardware type in a library (for example FC16 vs GENERIC vs ICSTATION in MD_MAX72XX) makes text appear upside down, mirrored, or split across the wrong modules even though wiring is correct.

MAX7219 LED Matrix questions

Can I use a MAX7219 matrix with an ESP32?

Yes, with care. Power the module from the ESP32 board's 5 V (VIN) pin, since the MAX7219 needs at least 4.0 V (Maxim datasheet, p. 2). Its inputs are only guaranteed to read high from 3.5 V (p. 3), so 3.3 V signals often work but are out of spec; a 74HCT125 buffer or level shifter on DIN, CLK and CS makes it reliable.

How much current does a MAX7219 8x8 module draw?

With every segment and decimal point lit at 40 mA, a MAX7219 draws about 330 mA (Maxim datasheet, p. 2); in shutdown it draws 150 µA (p. 1). Real use is lower, since text lights only some LEDs and the intensity register dims the average current in 16 steps (p. 8). Budget about 330 mA per module for a worst case.

How do I chain several MAX7219 modules?

Wire DOUT of one module to DIN of the next and share CLK and CS. Data comes out of DOUT 16.5 clock cycles after it enters DIN (Maxim datasheet, p. 5), so the controller shifts 16 bits per module and then raises CS once. Tell the library how many modules are in the chain.

Why is my MAX7219 matrix blank?

On power-up the chip is in shutdown with the display blanked (Maxim datasheet, p. 7), so your code must take it out of shutdown and set the scan limit to 8 digits; libraries do this in their begin call. Then check that CS is wired, that data goes into DIN and not DOUT, and that the supply is 5 V.

Why is the text on my MAX7219 display mirrored or upside down?

Module makers wire the matrix rows and columns differently. In MD_MAX72XX, pick the hardware type that matches your board (FC16_HW for the common FC-16 four-in-one modules, or GENERIC_HW and ICSTATION_HW for others). The wiring can be perfect and the text still mirrored until the type matches.

What is the MAX7219 used for besides LED matrices?

The same chip drives up to eight 7-segment digits, with a built-in code-B decoder for numbers (Maxim datasheet, p. 7). For a matrix, decoding stays off and each register holds one row of eight dots.

Build something with the MAX7219 LED Matrix

  • Scrolling text marquee

    Chain four 8x8 modules into a 32x8 strip and scroll messages, clocks, or sensor readouts across it using a MAX7219 text library.

    Build this
  • Digital clock display

    Pair the matrix with an RTC module to show the time in a compact scrolling or static font, a classic desk-clock build.

    Build this
  • 8x8 dot-matrix games

    Snake, Pong, and falling-block games map neatly onto the 64-pixel grid, using the driver's fast full-frame updates for smooth animation.

    Build this
  • Audio VU meter / spectrum visualizer

    Drive the columns from an analog audio envelope or FFT bins to turn the matrix into a bar-graph level meter that reacts to sound.

    Build this
  • Notification and status board

    Show icons, weather glyphs, or notification counts from a connected ESP32/ESP8266, updating the matrix over Wi-Fi.

    Build this
For AI assistants

This page as plain Markdown, for ChatGPT, Claude or your own agent. /components/max7219-matrix.md

What will you build with it?