The MAX7219 and MAX7221 Led drivers using Arduino

The MAX7219 and MAX7221 Led drivers (1)

These two integrated circuits from Maxim are for driving either 64 individual Led’s, or up to 8 digits of 7-segment displays. The drivers implement a SPI compatible slave interface that can be controlled from the Arduino using only 3 of the digital output pins. An extensive datasheet for the IC’s is available from the Maxim homepage. Since both chips are very similar, I will use the term MAX72XX for both the MAX7221 and the MAX7219.

The MAX7219 and MAX7221 Led drivers (1)

I will focus on building the Led driver hardware, so this article should be considered as only a supplement to the original datasheet.

In other words : First read the original datasheet, then read this article for some extra Arduino-info.

Table of contents

Wiring and schematics

Here is a basic schematic for a MAX72XX, showing the data signals coming from the Arduino.

There are not yet any Leds in the schematic. There will be an extra section on Led wiring.

Besides the MAX72XX itself and the Leds you need only 3 external components: two capacitors (C1;C2) and a resistor (RSet).

The capacitors are there to supress noise signals introduced through the power-supply lines. By no means these 2 capacitors can be ommitted, as it might lead to sporadic or permanent malfunctions. These types of errors are really hard to track down. Both capacitors must be placed as near as possible to the V+ and the Gnd pins of the MAX72XX.

The MAX7219 and MAX7221 Led drivers1 (1)

The resistor RSet is responsible for setting an upper limit on the current that is fed into the Leds. Selecting the correct resistor value might not be trivial. There is an in-depth discussion on this later.

The MAX72XX has to be powered with +5V. For a single Led-matrix it is possible to use the +5V supply from the Arduino-board. If you add more than one matrix to the Arduino you will probably need an external power-supply. More on this in section Power supply issues.

Wiring the Arduino

The Gnd-Pins of the MAX72XX have to be connected to one of the Gnd-Pins on the Arduino board. That makes both circuits work on the same voltage-level. The positive power-supply pins (+5V/Vcc) can be connected to the Arduino-board for a limited number of Led’s.(See Power supply issues for details.)

The three signal lines (DIn,CLK,Load(/CS)) have to be connected to three digital outputs on the Arduino board. It depends on the software which Arduino pins have to be used. For the exact pin-numbers you have to refer to the documentation of the library or the example code on which you build your project. With most of the libraries for the MAX72XX you are free to choose any pins you like.


Read more: The MAX7219 and MAX7221 Led drivers

Leave a Comment

Your email address will not be published. Required fields are marked *