Arduino connected to MAX7219


Arduino with Serially Interfaced MAX7219 Operates 8X8 LED Matrix

by Lewis Loflin

Related YouTube video for this project: Arduino DS1307 RTC Clock with MAX7219 LED Display Controller

The following demonstrates the use of the MAX7219 display driver with a Arduino Microcontroller. This sample code move an arrow across a 8X8 LED matrix. These units are inexpensive and sold by several vendors on Ebay for under $5. This code was ported over from my PIC18F2550 pages and was designed to work on either micro-controller without the use of other user libraries. This makes the code more portable.

This demo operates in the non-decode mode.

The MAX7219 is a serial input/output common-cathode display driver that interfaces microprocessors to a 7-segment numeric LED displays of up to 8 digits, bar-graph displays, or 64 individual LEDs.

First the address (0x00 - 0x0f) is clocked in by ssrWrite(), then the data or command byte is clocked in.

Included on-chip are a BCD code-B decoder, multiplex scan circuitry, segment and digit drivers, and an 8x8 static RAM that stores each digit. Only one external resistor is required to set the segment current for all LEDs.

A convenient 4-wire serial interface connects to all common uPs. Individual digits may be addressed and updated without rewriting the entire display. The MAX7219 will also allow the user to select code- B decoding or no-decode for each digit.

The devices include a 150uA low-power shutdown mode, analog and digital brightness control, a scan limit register that allows the user to display from 1 to 8 digits, and a test mode that forces all LEDs on.

Arduino code for this project: arduino_max7219a.txt.

Stepper Motors

Serial LCD Display and assorted Sensors

Web site Copyright Lewis Loflin, All rights reserved.
If using this material on another site, please provide a link back to my site.