Professional Documents
Culture Documents
88 LED Matrix modules are now widely available, and fortunately they are easy to use
with our favorite Arduino microcontroller. 88 LED Matrix module have many
applications in real life, such as various types of electronic display panels.
The LED matrix can be driven in two ways (parallel or serial). Here we drive it in the
serial manner in order to save interface (needs only three data lines). The serial-driven
LED matrix actually dynamically displays the LEDs (row-by-row or column-by-
column). The persistence of vision for humans is about 0.1s, so as long as we can
serially display all 8 rows/columns within 0.1s, well see a complete character or
pattern.
Our project is infact an Arduino with Serially Interfaced MAX7219 Operates an 8X8
LED Matrix to display a heart pattern. The MAX7219 IC 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. For
convenience, here an 88 LED matrix, integrated with a MAX7219 IC setup, available
as a pre-wired module is used. Typical specification of this LED Matrix Module is
shown below:
Typical Voltage: 5V
Wiring Instructions
5. Connect external 5VDC supplys GND, to the GND of 88 LED Matrix Module
Note that the 8x8LED Matrix Module should be common-grounded with Arduino, ie,
always remember to interconnect the Arduino GND terminal with the external 5VDC
power supply GND terminal. Connect pins according to the instructions given above,
and download the sketch into Arduino board. If everything seems right, you can power
up the Arduino (and the LED matrix) to see the LED matrix circularly displays a
sweetheart pattern!
Wiring Diagram
Warning!
Before powering up, ensure that corresponding wires are properly connected.
Arduino Sketch
1 /*
4 * Using Max7219 IC
5 * Designed by T.K.Hareendran
7 * 17 July 2014
8 * http://www.electroschematics.com
9 */
10
11 unsigned char i;
12 unsigned char j;
13
15 int Max7219_pinCS = 9;
16 int Max7219_pinDIN = 8;
17
18 unsigned char disp1[19][8]={
36
37 };
38
40 {
41 unsigned char i;
42 digitalWrite(Max7219_pinCS,LOW);
43 for(i=8;i>=1;i--)
44 {
45 digitalWrite(Max7219_pinCLK,LOW);
46 digitalWrite(Max7219_pinDIN,DATA&0x80);
47 DATA = DATA<<1;
48 digitalWrite(Max7219_pinCLK,HIGH);
49 }
50 }
51
53 {
54 digitalWrite(Max7219_pinCS,LOW);
55 Write_Max7219_byte(address);
56 Write_Max7219_byte(dat);
57 digitalWrite(Max7219_pinCS,HIGH);
58 }
59
60 void Init_MAX7219(void)
61 {
62 Write_Max7219(0x09, 0x00);
63 Write_Max7219(0x0a, 0x03);
64 Write_Max7219(0x0b, 0x07);
65 Write_Max7219(0x0c, 0x01);
66 Write_Max7219(0x0f, 0x00);
67 }
68
69 void setup()
70 {
71
72 pinMode(Max7219_pinCLK,OUTPUT);
73 pinMode(Max7219_pinCS,OUTPUT);
74 pinMode(Max7219_pinDIN,OUTPUT);
75 delay(50);
76 Init_MAX7219();
77 }
78
79 void loop()
80 {
81 for(j=0;j<19;j++)
82 {
83 for(i=1;i<9;i++)
84 Write_Max7219(i,disp1[j][i-1]);
85 delay(500);
86 }
87 }
88
Previous
Contest #4: Guess what it is?
Next
A Primer on Solar Charge Controls