Hey there!
I am trying to get a 7-segment display to display numbers using the maxim 7219 chip and the LedControl Library using an arduino uno. I have tried every wiring diagram I can find online and still cant get anything to display.
I'm connecting uno pin 12 to max pin 1, uno pin 11 to max pin 13, uno pin 10 to max pin 12. I also currently have a 10 uf capacitor and a 100nf cap in parallel with my 5v and gnd. I have the suggested 10k resistor between max pin 18 and vcc. Ive tried putting pull down resistors on the clk and load lines but that didnt seem to help.
Here is the basic code I wrote:
#include "LedControl.h"
LedControl lc = LedControl(12,11,10, 1);
//Variables
int i = 0;
void setup() {
Serial.begin(9600);
lc.shutdown(0, false);
lc.setIntensity(0, 2);
lc.clearDisplay(0);
}
void loop() {
while (i < 9) {
Serial.println(i);
lc.setDigit(0, 0, i, false);
lc.setDigit(0, 1, i, false);
lc.setDigit(0, 2, i, false);
lc.setDigit(0, 3, i, false);
delay(1000);
++i;
}
while (i > 0) {
Serial.println(i);
lc.setDigit(0, 0, i, false);
lc.setDigit(0, 1, i, false);
lc.setDigit(0, 2, i, false);
lc.setDigit(0, 3, i, false);
delay(1000);
--i;
}
}
My 7 segment will randomly flash and light up when its uploading the sketch but no action upon running my code. Is there a way to know if I have a bad chip or not? I have 2 and neither seem to be functional.
At my wits end, any help is very much appreciated.
Thanks!