I'm trying to hook up my Arduino Uno to a Max7219 led controller and 1 Seven segment LED Display. At this point I'm just trying to connect to only 1 display to keep things simple. I've used the following wiring schematics as my guide:
Arduino Playground - MAX72XXHardware and
http://tronixstuff.wordpress.com/2010/07/09/review-maxim-max7219-led-display-driver-ic/
I'm new to electronics. I've downloaded the LedControl library and I've only coded the bare minimum programming to see if I can test my wiring. I didn't even code the Loop() event, only the Setup(). I've included some pictures to show you how it's wired up. I've also included the program at the bottom.
I was successful in getting the display to show the number 1 and the number 7. I can't get any other numbers to display. What happens is when the program starts, the number I'm trying to display flashes for a split second then vanishes. I've included a video of this below. I'm not even sure what the arguments to setDigit are - I was guessing and was lucky so far. I can't find any documentation for the functions in the LedControl library - I can only find articles where people tend to get overly complicated.
1 - I was hoping someone could offer assistance with the setDigit function. I'm trying to display a number on a single LED display as shown below. Nothing fancy. Am I using the function incorrectly below?
2- Why do you think only 1 and 7 works but other numbers don't. I thought it had to do with the fact that numbers 1 and 7 use the least amount of led segments (2 and 3 segments). I thought maybe my USB port was not supplying enough juice. So I hooked up a power supply to the Arduino and it still behaved the same way.
3- When I wired the LED I connected the bottom common cathode pin to the Max7219 Dig0 pin (pin 2). I left the other CC unconnected as it appeared that way in the article referenced above. I also tried connecting this to the Arduino ground. No difference.
Thank you very much for any assistance offered!
Here are some pictures of my setup
The next pics show the numbers 1 and 7 lighting up ok.
Here's a video of the quick flash problem: - YouTube
Here's the code I'm running:
#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,8);// sets brightness (0~15 possible values)
lc.clearDisplay(0);// clear screen
lc.setDigit(0,0,2,false); //This does not work. Only 1 and 7 does
}
void loop()
{
//This code successfully flashes 1 and 7 but I've
//commented this out for now.
//lc.setDigit(0,0,0,false);
//delay(1000);
//lc.setDigit(0,0,7,false);
//delay(1000);
}
Thanks again!