Controlling a Led matrix or 7-segment displays with the MAX7219 or the MAX7221

There are different solutions for driving this popular piece of hardware from the Arduino. If you are not familiar with the MAX7219 or MAX7221 you should start by reading the hardware related documents

The software for driving these chips is covered on several pages:

  • The 8x8 Matrix controlled by a max7219 article provides code examples and a schematics for driving a 8x8 Led matrix. Supports multiple cascaded MAX7219.
  • The Matrix-library This is the original documentation for the Matrix-library that was shipped with the Arduino software pre Arduino 1.0. The library supports only a single MAX7219 and only works with Arduino 022 and below. To connect multiple MAX7219s together you wire the clk and data to the same lines but the load data line goes to a different pin, also you must define a new matrix and give it a different name.
  • The LedControl-library Supports the MAX7219 and the MAX7221. It can drive multiple devices and has a specific command-set for 7-segment displays (besides the common Led matrix functions).
  • The MAX7219-Library is another available library that supports cascaded MAX7219's and some basic matrix functions(e.g shiftleft, shiftright, flip, rotate, raise, lower).
  • The Max72xxPanel library implements Adafruit's GFX library for multiple 8x8 LED displays driven by MAX7219 or MAX7221, in arbitrary rectangular layout. Support for basic graphic primitives and text. Features double buffering to prevent flicker.

More specific problems with the MAX7219 or MAX7221 have been discussed several times on the Arduino Hardware Forums.

Share