So I ordered the kit. :-)
Amazon Prime delivered quickly and the kit was relatively easy to solder. Both the 8x8 display and the MAX7219 are socketed so you can easily remove them if you want to use in a different project. From the looks of it the board can be easily cascaded with other devices to create larger displays. John Boxall does exactly that in his book The Arduino Workshop and posts a copy of the project online here.
The LedControl Arduino library has full support of the MAX7219 to control an 8x8 display. The library does all the shifting out and multiplexing of row and column leds...All you do is tell it the row and column of the led you would like to turn on or off!
One single MAX7219 can also control up to 8 7segment displays. Unlike my prior example, where each 7 segment display is driven by an individual 74HC595, the MAX7219 multiplexes the 7 segment displays so that only one is on at a time. This cuts the current usage and because of the persistence of vision it appears that all 8 digits are on constantly.
So here is a peek at my finished MAX7219 8X8 Red Dot LED Matrix Kit running the test program.
#include "LedControl.h" // need the library
LedControl lc=LedControl(12,11,10,1); //
// pin 12 is connected to the MAX7219 pin 1 - Data In
// pin 11 is connected to the CLK pin 13
// pin 10 is connected to LOAD pin 12
// 1 as we are only using 1 MAX7219
void setup()
{
// the zero refers to the MAX7219 number, it is zero for 1 chip
lc.shutdown(0,false);// turn off power saving, enables display
lc.setIntensity(0,8);// sets brightness (0~15 possible values)
lc.clearDisplay(0);// clear screen
}
void loop()
{
for (int row=0; row<8; row++)
{
for (int col=0; col<8; col++)
{
lc.setLed(0,col,row,true); // turns on LED at col, row
delay(25);
}
}
for (int row=0; row<8; row++)
{
for (int col=0; col<8; col++)
{
lc.setLed(0,col,row,false); // turns off LED at col, row
delay(25);
}
}
}
No comments:
Post a Comment