Hello,
I am trying to put together a circuit using my arduino mega 1280, a max7219 LED driver and a 8x8 LED matrix.
I have torn down my circuit and rebuilt it. I have swapped every part and wire also. For some reason, my LED matrix lights up ALL the led's all the time. Can someone help me understand what I'm doing wrong? Even if I set the intensity to 1 the brightness doesn't change. Even if I indicate that only 1 LED should turn on, they still turn on. Even if I set lc.shutdown(0,true) they all stay on.
I have followed the wiring diagram here:
http://arduino.cc/playground/Main/MAX72XXHardware
C1 I have as 0.1uF
C2 I have as 100uF (not the 10uF as stated in the diagram but it's all I have)
Rset is 10k
My code is:
#include "LedControl.h" // need the library
LedControl lc=LedControl(12,11,10,1); // lc is our object
// pin 12 is connected to the MAX7219 pin 1
// 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,1);// 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(10);
lc.setLed(0,col,row,false); // turns off LED at col, row
delay(10);
}
}
}