LED Matrix
Interfacing MAX7219 Matrix LED Matrix with Arduino Uno
What is the MAX7219 Matrix?
This module pairs the same MAX7219 driver chip used on the 8-digit 7-segment display with an 8x8 single-color LED matrix instead of digits. The wiring and 3-wire serial protocol (DIN, CLK, CS/LOAD) are identical to the 7-segment version — the only difference is how you interpret the bytes you send, since each byte now maps to one row of 8 pixels rather than one digit's segments.
Modules cascade the same way, DOUT into the next module's DIN, which makes them the standard building block for scrolling text signs, VU meters, and simple pixel animations spanning multiple panels. For anything beyond lighting a static pattern — scrolling text in particular — reach for the MD_MAX72XX library rather than the simpler LedControl, since it has font rendering and scroll-buffer logic built in that LedControl lacks.
Specifications
| Matrix size | 8 x 8 pixels, single color per module |
| Driver chip | MAX7219 (also used on the matching 7-segment module) |
| Operating voltage | 4V - 5.5V DC (5V typical) |
| Interface | 3-wire serial (DIN, CLK, CS/LOAD) — SPI-like but not true SPI |
| Cascading | Chain via DOUT -> next module's DIN to build wider scrolling signs |
| Refresh | Handled internally by the chip — no software multiplexing required |
MAX7219 Matrix Pinout
| Pin | Name | Description |
|---|---|---|
| 1 | VCC | Power, 5V DC |
| 2 | GND | Ground |
| 3 | DIN | Serial data in — connect to MCU MOSI-equivalent pin, or previous module's DOUT when cascading |
| 4 | CS | Chip select / LOAD — latches data on the rising edge; shared across all cascaded modules |
| 5 | CLK | Serial clock — shared across all cascaded modules |
| 6 | DOUT | Serial data out — connect to the next module's DIN when chaining multiple matrices |
This module shares its pinout and protocol with the MAX7219 7-segment display — the hardware wiring is identical, only your data interpretation differs in code. Use MD_MAX72XX rather than LedControl if you plan to scroll text, since it includes font and scroll-buffer support that LedControl does not.
Setting Up MAX7219 Matrix with Arduino Uno
Library
LedControl by Eberhard Fahle
Library Manager → search "LedControl" → install "LedControl by Eberhard Fahle"
Wiring
| Component pin | Arduino Uno pin | Note |
|---|---|---|
| VCC | 5V | — |
| GND | GND | — |
| DIN | D11 | Software SPI in this library — any digital pin, D11 matches hardware MOSI by convention |
| CS | D10 | — |
| CLK | D13 | Matches hardware SCK by convention |
Example code
For multiple cascaded modules, raise the last constructor argument and address each with the same 0-based device index used in setRow/setLed.
Related Components
Related Guides & Projects

Arduino Uno R3 Pinout: Every Pin Explained (Digital, Analog, PWM, Power)
Complete Arduino Uno R3 pinout reference: all 14 digital pins, 6 analog inputs, PWM, UART, SPI, I2C, AREF, and power rails explained with wiring tips and common mistakes.

Ultimate Arduino Mega 2560 Pinout Guide: Complete Power & I/O Reference
Master the Arduino Mega 2560 pinout. Detailed reference for all 54 digital pins, 16 analog inputs, PWM, UARTs, SPI, I2C, interrupts, and power. Includes a printable table and practical wiring tips.

Interfacing HC-SR04 Ultrasonic Sensor with Arduino
Measure distance accurately using ultrasonic sound waves and an Arduino Uno — no complex math, no expensive hardware.
HC‑SR04 Ultrasound Distance Measurement with Arduino – Parking Alert (LCD & Buzzer)
Learn HC‑SR04 ultrasound distance measurement with Arduino Uno. Build a parking alert system with 16x2 LCD and buzzer – shows distance and beeps faster as you approach.