Controlling an 8x8 dot matrix LED Display

In this project, you'll learn how to connect and control an 8x8 dot matrix LED display using the MAX7219 driver chip.

In the 7-segment LED display tutorial, you learned how to control one 7-segment LED display. In order to control more LED lights such as an 8x8 dot matrix LED display with 64 individual LEDs you will need to use a dedicated LED driver chip such as the MAX7219.

The LedControl library contains all of the functions for interfacing with the MAX7219 LED driver chip. Using this library you can easily control a chain of eight MAX7219 chips connected together. This will give you a total of 8x64 = 512 LEDs! In fact, you can have more than one chain.

Parts needed:
  • Arduino
  • 8x8 dot matrix LED display with built-in MAX7219 LED driver chip
  • Wires
Arduino      8x8 dot matrix LED display     
1 Making the connections
The MAX7219 chip requires five connections to the Arduino: DIN, CS, CLK, V+ and GND.

MAX7219 Arduino Description
1 12 DIN
12 11 CS
13 10 CLK
19 5V V+
9 GND GND
3 Download and save the LedControl library. Do not open it.
4 Install the LedControl library by selecting Sketch from the Arduino IDE menu
  • then select Import Library or Include Library
  • then select Add Library or Add .ZIP Library
Locate and select the LedControl.zip file that you just downloaded in step 2. It should be in the Download folder.

Click click the Open button

(Refer to this document for more information on how to install a library if you run into problems.)
5 Create a new program by selecting File from the menu
  • then select Examples
  • then select LedControl
  • then select _8x8dotmatrix
Refer to the LedControl library reference documentation for details on how to use the functions in this library.
6 Upload and run the program.