← 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| Pin | Name | Functions | Notes |
|---|---|---|---|
| 1 | DIN | SPI | Serial-Data Input |
| 2 | DIG 0 | GPIO | Digit Drive Line (sinks current) |
| 3 | DIG 1 | GPIO | Digit Drive Line (sinks current) |
| 4 | GND | GND | Ground |
| 5 | DIG 2 | GPIO | Digit Drive Line (sinks current) |
| 6 | DIG 3 | GPIO | Digit Drive Line (sinks current) |
| 7 | DIG 4 | GPIO | Digit Drive Line (sinks current) |
| 8 | DIG 5 | GPIO | Digit Drive Line (sinks current) |
| 9 | GND | GND | Ground |
| 10 | DIG 6 | GPIO | Digit Drive Line (sinks current) |
| 11 | DIG 7 | GPIO | Digit Drive Line (sinks current) |
| 12 | LOAD | SPI | Load-Data Input (MAX7219 only) |
| 13 | CLK | SPI | Serial-Clock Input |
| 14 | SEG A | GPIO | Segment Drive Line |
| 15 | SEG B | GPIO | Segment Drive Line |
| 16 | SEG C | GPIO | Segment Drive Line |
| 17 | SEG D | GPIO | Segment Drive Line |
| 18 | ISET | ADC | Set Segment Current Input |
| 19 | V+ | POWER | Positive Supply Voltage |
| 20 | SEG E | GPIO | Segment Drive Line |
| 21 | SEG DP | GPIO | Decimal Point Drive Line |
| 22 | SEG G | GPIO | Segment Drive Line |
| 23 | SEG F | GPIO | Segment Drive Line |
| 24 | DOUT | 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
3Starter 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
| Pin | Arduino Uno R3 | ESP32 DevKitC (WROOM-32) | Notes |
|---|---|---|---|
| VCC | +5V | 5V | 5 V for full brightness |
| GND | GND | GND | |
| DIN | D11 (MOSI) | GPIO23 | Hardware-SPI data |
| CLK | D13 (SCK) | GPIO18 | Hardware-SPI clock |
| CS/LOAD | D8 | GPIO5 | Latch (LOAD/CS) |