Volt Docs

Reference

MAX7219

LED dot matrix / 7-segment driver.

Connects over
SPI
Made by
Maxim Integrated
Datasheet
datasheets.maximintegrated.com

Use it

main.volt
hardware {
    device max7219: MAX7219(cs: 16)
}

every 1s {
    max7219.set_row(1, 1)
}

The MAX7219 goes on the SPI bus; give it its cs pin as an argument.

Methods

  • max7219.set_row(row: int, data: int)

    Set matrix row

  • max7219.set_intensity(level: int)

    Brightness 0-15

  • max7219.clear()

    Clear all

  • max7219.set_digit(pos: int, value: int, dp: int)

    Set 7-seg digit

Wiring

PinConnect to
VCC3.3V or 5V
GNDGround
SCKSPI clock
MOSIMaster Out / Slave In
MISOMaster In / Slave Out
CSChip select (active low)

Specifications

Voltage
4.0V – 5.5V (logic + LED supply)
Current
330 mA peak (all LEDs on full brightness)
Outputs
8 digits × 7-segment, or 8×8 LED matrix
Brightness steps
16
Interface speed
SPI up to 10 MHz

Tips

  • Daisy-chain by feeding each chip's DOUT into the next chip's DIN — same CS for all.
  • ISET resistor between ISET pin and VCC sets segment current — use 22kΩ for normal LEDs, 10kΩ pushes brighter.
  • MAX7219 sources 5V to segments — works for 2V LEDs through built-in driver; not for 12V LEDs.

Alternatives worth knowing:

  • HT16K33: I²C alternative — fewer pins on the MCU side.