← All parts

MAX7219 LED Driver

MAX7219

Analog Devicesinterface io display

The MAX7219/MAX7221 are serial input/output drivers for 7-segment LED displays, bar graphs, or individual LEDs. They feature on-chip RAM, current control, and a 4-wire serial interface for easy microprocessor connection.

In stock

Specifications

14
Operating Voltage
4.0 V
Operating Voltage
5.5 V
Interface
SPI
Interface
QSPI
Interface
MICROWIRE
Clock Speed
10 MHz
Operating Supply Current
150 µA
Shutdown Supply Current
150 µA
Operating Temperature Range
0 °C
Operating Temperature Range
70 °C
Operating Temperature Range
-40 °C
Operating Temperature Range
85 °C
Package
24-Pin DIP
Package
24-Pin SO

Pinout

24
PinNameFunctionsNotes
1DIN
SPI
Serial-Data Input
2DIG 0
GPIO
Digit Drive Line (sinks current)
3DIG 1
GPIO
Digit Drive Line (sinks current)
4GND
GND
Ground
5DIG 2
GPIO
Digit Drive Line (sinks current)
6DIG 3
GPIO
Digit Drive Line (sinks current)
7DIG 4
GPIO
Digit Drive Line (sinks current)
8DIG 5
GPIO
Digit Drive Line (sinks current)
9GND
GND
Ground
10DIG 6
GPIO
Digit Drive Line (sinks current)
11DIG 7
GPIO
Digit Drive Line (sinks current)
12LOAD
SPI
Load-Data Input (MAX7219 only)
13CLK
SPI
Serial-Clock Input
14SEG A
GPIO
Segment Drive Line
15SEG B
GPIO
Segment Drive Line
16SEG C
GPIO
Segment Drive Line
17SEG D
GPIO
Segment Drive Line
18ISET
ADC
Set Segment Current Input
19V+
POWER
Positive Supply Voltage
20SEG E
GPIO
Segment Drive Line
21SEG DP
GPIO
Decimal Point Drive Line
22SEG G
GPIO
Segment Drive Line
23SEG F
GPIO
Segment Drive Line
24DOUT
SPI
Serial-Data Output

Interactive pinout

Highlight:
MAX7219

Click a pin to copy its name · tap a tag above to spotlight a bus.

Logic level & voltage

Operates from 4.0-5.5 V (per the datasheet specs) over an SPI-like interface; it's a 5 V LED driver, so level-shift data from a 3.3 V MCU.

Typical uses

  • Driving 8x8 LED matrices and 7-segment displays
  • Daisy-chained scrolling-text panels
  • Bar-graph and indicator banks

Wiring notes & gotchas

  • Set segment current with the ISET resistor — don't omit it.
  • Decouple VCC heavily (the LED switching is bursty).
  • From a 3.3 V host, level-shift DIN/CLK/LOAD up to 5 V.

Commonly used with

3

Starter code

Community starter examples — minimal, unofficial, and provided to get you wiring fast. Verify against the manufacturer datasheet before relying on them.

Arduino (C++)

Arduino library: MD_MAX72XX (by majicDesigns)

arduino
// MAX7219 8x8 LED matrix driver (hardware SPI) — community starter example
#include <MD_MAX72xx.h>
#include <SPI.h>

#define HARDWARE_TYPE MD_MAX72XX::FC16_HW   // try GENERIC_HW if rows/cols look wrong
#define MAX_DEVICES   1
#if defined(ESP32)
  #define CS_PIN 5
#else
  #define CS_PIN 8
#endif

// Uses hardware SPI: DIN->MOSI, CLK->SCK, plus this CS pin.
MD_MAX72XX mx = MD_MAX72XX(HARDWARE_TYPE, CS_PIN, MAX_DEVICES);

void setup() {
  mx.begin();
  mx.control(MD_MAX72XX::INTENSITY, 5);
  mx.clear();
}

void loop() {
  for (uint8_t r = 0; r < 8; r++) { mx.setRow(r, 0xFF); delay(80); }
  mx.clear();
  delay(400);
}

MicroPython

MicroPython library: max7219 (mcauser/micropython-max7219)

python
# MAX7219 8x8 matrix (ESP32) — community starter example
# lib: mcauser/micropython-max7219 (max7219.py on the board)
from machine import Pin, SPI
import max7219, time

spi = SPI(2, baudrate=1000000, sck=Pin(18), mosi=Pin(23))
disp = max7219.Matrix8x8(spi, Pin(5), 1)   # CS/LOAD on GPIO5
disp.brightness(5)

while True:
    disp.fill(1); disp.show(); time.sleep(0.5)
    disp.fill(0); disp.show(); time.sleep(0.5)

Wiring

PinArduino Uno R3ESP32 DevKitC (WROOM-32)Notes
VCC+5V5V5 V for full brightness
GNDGNDGND
DIND11 (MOSI)GPIO23Hardware-SPI data
CLKD13 (SCK)GPIO18Hardware-SPI clock
CS/LOADD8GPIO5Latch (LOAD/CS)

Related parts

6