Project Description

TUTORIAL

Dual MAX7219 connected to an Arduino

How to connect and use the MAX7219 LED Matrix

VIDEO

PARTS USED

OVERVIEW

Using a LED Dot Matrix in your next project can be a way to incorporate some cool little animations.

By using these 8X8 matrix modules you can  create your own.

 

Since these modules use the MAX7219 LED driver chip, we will be able to turn on and off the 64 LEDs of each modules, using only 3 pins on our Arduino.

 

In this tutorial we will connect 2 of them together to display different animations on each one.

SCHEMATIC

Max7219 Arduino Connections

As you can see, even if we are using 2 Modules, the number of pins needed, does not increase.

VCC and Ground are connected to the Arduino.

Pin 12 is connected to DIN, Pin 11 is connected to CLK and Pin 10 is connected to CS.

THE CODE

Our Sketch will make use of the “LedControl” Library to communicate with the MAX7219 modules.

Download and extract it to your Library folder, then restart your IDE software.

As always you can have a look at the tutorial video for more information.

The code below assumes that we have 2 Dot Matrix connected together in cascade, but you can modify it easily if you have more or less of them connected.

 

We select the module we want to write to by using a number based on where it is in the chain, starting from 0 for the first one, 1 for the second, and so on…

 

 

DOWNLOAD

Download the LedControl library here:  LedControl.zip

Download the Sketch here:  MAX7219_Tutorial.zip