7-Segment
Interfacing MAX7219 7Seg 7-Segment with Arduino Uno
What is the MAX7219 7Seg?
The MAX7219 is a serial LED driver chip that handles all the multiplexing for an 8-digit 7-segment display internally, so instead of juggling dozens of GPIO pins you drive the whole thing over a simple 3-wire serial link (DIN, CLK, CS/LOAD). You send it 16-bit commands specifying a digit position and a value, and the chip takes care of refreshing the display at a flicker-free rate on its own — the microcontroller never has to babysit the multiplexing.
Because the protocol is dead simple and the chip handles brightness (via a single register) and cascading natively, MAX7219 modules are the standard choice for scoreboards, larger digit counters, and any project needing more than 4 digits. Multiple modules chain together by connecting one module's DOUT to the next module's DIN — the same three control lines then drive the whole chain, and your code just addresses a higher device index.
Specifications
| Digits | 8 x 7-segment digits (with decimal point) per module |
| Driver chip | MAX7219 (also used on the matching LED matrix module) |
| Operating voltage | 4V - 5.5V DC (5V typical, breakout not 3.3V-rated) |
| Interface | 3-wire serial (DIN, CLK, CS/LOAD) — SPI-like but not true SPI |
| Segment current | Set by an external ISET resistor on the module (~40 mA total typical, fixed on most breakout boards) |
| Cascading | Chain via DOUT -> next module's DIN; same CLK/CS lines drive the whole chain |
| Refresh | Handled internally by the chip — no software multiplexing required |
MAX7219 7Seg Pinout
| Pin | Name | Description |
|---|---|---|
| 1 | VCC | Power, 5V DC |
| 2 | GND | Ground |
| 3 | DIN | Serial data in — connect to MCU MOSI-equivalent pin, or to the 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 displays |
CLK and CS are shared across every module in a chain — only DIN/DOUT actually daisy-chains from module to module. Most breakout boards fix the segment current via an onboard resistor, so unlike a bare MAX7219 IC you don't need to calculate ISET yourself. Use the LedControl or MD_Max72xx library rather than writing raw SPI transactions — MD_Max72xx in particular has built-in support for scrolling text and chained addressing, which matters as soon as you cascade more than one module.
Setting Up MAX7219 7Seg with Arduino Uno
Library
LedControl by Eberhard Fahle
Arduino IDE → Library Manager → search "LedControl"
Wiring
| Component pin | Arduino Uno pin | Note |
|---|---|---|
| VCC | 5V | — |
| GND | GND | — |
| DIN | D11 | — |
| CS | D10 | — |
| CLK | D13 | — |
| DOUT | Next module's DIN (if cascading) | Leave unconnected on the last module in a chain |
Example code
This is a 3-wire bus, not true SPI -- LedControl bit-bangs it, so any digital pins work, not just the hardware SPI pins shown here. Cascade multiple modules by chaining DOUT to the next module's DIN and increasing the device count in the LedControl constructor.
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.