RSS Feed Email Facebook Twitter Stumbleupon Google Bookmark

MAX7219 LED Driver

The Maxim MAX7219 is an LED display driver that can control up to 64 individual LEDs, or eight 7-segment LED digits, or any combination of individual LEDs and digits, connected in a matrix of eight rows and eight columns. It frees the host from the chore of constantly multiplexing the 8 rows and 8 columns. In addition, it takes care of brightness control (16 steps), and implements display test and display blank (shutdown) features.

The host communicates with the MAX7219 using three signals: DATA, CLK, and LOAD. This module bit-bangs them, but Motorola's SPI interface (or similar interface from other manufacturers) may also be used to simplify and speed up the data transfer.

This module was written and tested using an Atmel AT89C2051 microcontroller, with the MAX7219 connected to I/O pins P3.3 (LOAD), P3.4 (CLK), and P3.3 (DATA). The Hi-Tech 8051 C compiler was used to test the code.

MAX7219 Interface Circuit

The code is provided in an archive (MAX7219.ZIP) that contains MAX7219.C and MAX7219.H. To use the module in your program, simply #include MAX7219.H from wherever you need to call the functions, and link MAX7219.C into your program.

Call MAX7219_Init() during program initialization, then call MAX7219_DisplayChar() to display a digit, passing it the digit number (position within the display) and the ASCII digit which should be displayed. As is, the module only displays 0-9, A-F, and a blank, but can easily be modified to display other letters and symbols.

Other MAX7219 Information

blog comments powered by Disqus