Introduction: Using 8×8 Dot Matrix LED With Arduino & Its Cascade Connection

About: ElectroPeak is your one-stop place to learn electronics and take your ideas into reality. We offer top-notch guides to show you how you can make your projects. We also offer high-quality products so you have a…

You can read this and other amazing tutorials on ElectroPeak's official website


In this tutorial, you’ll learn how to use a 8×8 dot matrix LED module with IC MAX7219. At the end, you’ll be able to display any shape or text on one or more Dot matrix easily, fixed or scrolled, using only 4 digital pins of arduino.

What You Will Learn:

  • What dot matrix LED is
  • How to use Dot matrix LEDs with Arduino
  • Displaying specific shapes on a Dot matrix LED module
  • Cascading two Dot matrix LEDs

Step 1: What Is Dot Matrix?

Dot Matrix LED 8×8 is an array of LEDs that you can display particular numbers, letters, and shapes on it. Dot matrixes are indicated by the number of rows and columns. The most popular type of Dot Matrix is its 8×8 type, which provides 64 LEDs in 8 rows and 8 columns.

To control the Dot Matrix 8×8 simply, you should connect each row and each column to a digital pin, which means you need 16 digital pins! So it’s not a proper way.
To control Dot Matrix, there are modules based on MAX72xx ICS which need to connect to 4 digital pins instead of 16. You can also connect multiple Dot Matrix (up to 8) to each other without needing any extra pin and cascades them.

Step 2: How to Interface Dot Matrix Module W/ Arduino

Step 3: Circuit

To connect the Dot Matrix to Arduino, simply connect the Vcc and GND pins to 5V and GND Arduino, and the DIN, CS, and CLK pins of dot matrix can be connected to any digital pins of arduino.

Step 4: Code

There are various libraries for Dot matrix and Arduino. The Ledcontrol and MaxMatrixlibraries are two of the most common libraries, both have the same structure.

Now upload the code on your Arduino board.

You can see some of the most important functions of this library in the above table.

Step 5: Displaying Specific Shapes on Dot Matrix

To display your particular shapes on the Dot Matrix, just turn the LED light pattern into a bit string. To do this, you can get help from online tools like this. Design your shape and copy the generated code to Arduino, then upload it on your board.

You can also create and display numbers and letters by this method.
To insert common numbers, letters, and symbols, you can use the code3 strings and functions:

Step 6: Cascading Two Dot Matrix LED Modules

One of the interesting features of the Dot Matrix module are ability to connect multiple (up to 8) modules and display cascading information on them.

Step 7: Circuit

To do this connect Dout from the first module to Din of the next module and connect other pins with the same name to each others.

Step 8: Code

Now upload the above code on your Arduino and see the result.

Do not forget that you are only programming the first module directly.