I've been struggling with driving a simple 8x8 LED matrix. I'm using the recommended MAX7221 (essentially identical to 7219) and the code on the Arduino playground (adapted from the built in 7219_v1 example) found here:
http://www.arduino.cc/playground/LEDMatrix/Max7219
I'm using a Lite-On matrix (LTP-14188A), it happens to be bi-color but i'm only using one color.
LITE-ON Technology Corporation.
It is cathode-common on the rows and anode-common on the columns. I have the DIG pins on the 7221 hooked up to columns and SEG pins hooked up to rows. No matter what commands I send, all LEDs are on. (I also tried it the other way but all LEDS were off no matter what.)
As you can see in the code, I am not setting Display Test register by mistake. I also am setting Decode Mode register to non-segment, i.e. matrix, display. I have not thoroughly verified the code since many others have reported using it and it works, although it seems to be correct (although the bitshifting in the putByte command could be more elegant). i also tried the original max7219_v1 code in the example led_drivers folder with no success.
Load line is pulled to ground with a 10k resistor. I-Set is pulled high with a 22k resistor, which appears to work fine as all LEDs are bright and can run off USB power as well as external power. The 7221 is decoupled from V+ to GND with 220uF and 0.1uF caps.
All the LEDs light up when power is applied. they do NOT go off when chip is re-programmed or reset. sending shutdown command manually has no effect. i have even tried a brand new 7221 chip. same thing.
if i attach an LED to the data line, clock line, and load line i can see voltage pulses, so they appear to be working. the load line appears to be high more of the time than the others (i.e. no visible flicker on debug LED), whichis what you would expect given that it is low only for a microsecond after both reg and data bytes are sent. (this is my cheap way of debugging without a scope
).
i can manually light an LED by placing its anode + leg to a segment pin on the 7221 and its cathode - leg to a digit pin. this makes sense since the datasheet says the SEG sources current, right?
so, in summary - i'm stumped!