Hi again, everyone.
I'm back at the led matrix trying my luck with a MAX 7219, but I can't seem to make it respond to commands.
I'm 100% confident I've wired it correctly with regards to anodes and cathodes. I've verified it for hours with a multimeter, fixed a missing anode wiring etc. It's not inverted.
I've got the following wiring from an Arduino Uno:
Data: D4 - Max DIN 01
Clock: D3 - Max CLK 13
Load: D2 - Max LS 12
For hours, I've had it set up with a 10K resistor from Max pin 19 to 18. Whenever I upload a program, it scans the rows for a second or two, then it "dies". No command I send do squat.
I researched for a bit and found I should add some caps (for unknown reasons), so I added a 0.1u and a 10u polarized from the same breadboard row as max pin 19 (V+) to ground. No noticeable change.
Then I figured I should probably see if I was overloading the stuff, so I swapped out the resistor with a 47K one. And what do you know? All the LEDs are constantly on. Still, no matter what I send the MAX, nothing happens.
I'm now running with a 100K resisitor and a 47u polarized cap. The LEDs are still on, and the following program does noting. (I'd expect it to blink the entire display at 1 Hz)
Any hints appreciated.
byte data = 4;
byte clk = 3;
byte latch = 2;
byte max_noop = 0x00;
byte max_d0 = 0x01;
byte max_d1 = 0x02;
byte max_d2 = 0x03;
byte max_d3 = 0x04;
byte max_d4 = 0x05;
byte max_d5 = 0x06;
byte max_d6 = 0x07;
byte max_d7 = 0x08;
byte max_decode_mode = 0x09;
byte max_intensity = 0x0A;
byte max_scan_limit = 0x0B;
byte max_shutdown = 0x0C;
byte max_test = 0x0F;
void output(byte address, byte data) {
digitalWrite(latch, LOW);
shiftOut(data, clk, MSBFIRST, address);
shiftOut(data, clk, MSBFIRST, data);
digitalWrite(latch, HIGH);
}
void setup() {
Serial.begin(9600);
pinMode(data, OUTPUT);
pinMode(clk, OUTPUT);
pinMode(latch, OUTPUT);
digitalWrite(data, LOW);
digitalWrite(clk, LOW);
digitalWrite(latch, LOW);
output(max_shutdown, 0x00);
}
void loop() {
output(max_shutdown, 0x00);
delay(1000);
output(max_shutdown, 0x01);
delay(1000);
}