Navigation

Saturday, 3 September 2016

MAX7219 LED Dot Matrix and Serial Peripheral Interface

The MAX7219 LED Dot Matrix is an inexpensive kit that contain a MAX7219 and an LED matrix. It’s a simple and inexpensive method of controlling 64 LEDs in either matrix or numeric display form. The MAX7219 is an integrated serial input/output common cathode display driver. It uses a four wire serial interface to connect to microcontrollers. The MAX7219 LED Dot Matrix connects to the Arduino as indicated below:

LED Matrix        Arduino    
VCC                        5V                  
GND                       GND              
DIN                         D12                
CS                          D10                
CLK                        D11

The LED Dot Matrix has output and input,  more than 1 MAX7219 display is connected in series driven by 1 Arduino. This is done by connecting the Vcc, GND, DOUT, CS and CLK pins from the first MAX7219 to the Vcc, GND, DIN, CS and CLK pins of the second and subsequent MAX7219.


The library for the Arduino MAX7219 can be found here. The library can be download, extracted and copied into the libraries folder in the Arduino directory.

Microcontrollers employ multiple approaches to communicate synchronously with peripheral devices and other microcontrollers. The Serial Peripheral Interface or SPI is one of such protocols. Two devices communicating with synchronous serial interfaces operate from the same clock. The clock signal is included in the interface cable between devices. Typically, the master device creates the clock, and the slave device(s) uses the clock to latch the data (in or out.) The SSI protocol includes four I/O lines. The CS is a logic control signal from master to slave signal signifying the channel is active. The CLK line is a clock generated by the master. The DOUT is a data line driven by the master and received by the slave. The DIN is a data line driven by the slave and received by the master. In order to work properly, the transmitting device uses one edge of the clock to change its output, and the receiving device uses the other edge to accept the data. In general, the SSI interface allows data to flow both directions.

No comments:

Post a Comment