Max7219, LedControl, stays in test mode?

I have two 7-segment leds connected to a max 7219. When I power it up, it appears to go into test mode (in which all LEDs light up at their max brightness) and remain there.

Here's some extra info that might help shed some light on it for somebody more knowledgeable about circuits than me:


When I add some pull-down resistors to each of the 3 IO pins, the following behaviors becomes more apparent...

If my setup looks like this:
{
lc.shutdown(0, false));
lc.setIntensity(0,0); // really dim so you can see this behavior better
lc.clearDisplay(0);
delay(10);
}

when the arduino resets, it'll flicker a few times as if it's lowering the intensity, but then go totally bright (presumably into test mode).

If I change the setIntensity() to a higher value, the flickering changes accordingly.
When you comment out setIntensity() altogether, or set it to the max, the flicker isn't apparent. ==> This leads me to believe the setIntensity() is doing something.

If i shutdown(0,true) instead (ie, shut it down), no flickering occurs (ie, setIntensity seems to do nothing), BUT the leds don't go out. It remains bright and in test mode. ==> leads me to believe shutdown() is doing something, but doesn't turn off the leds.


If anybody knows what's wrong, or has some ideas for further tests I can do to debug this, I'd really appreciate it. Thanks.

  • Mark

Hi,
usually this (Led's always lit with a MAX7219 allternativly Leds never light up with a MAX7221) is a sign of wiring the Leds in reverse.
Your 7-segment Displays have to be common cathode types.
Do you have the exact partnumber of the displays, and a link to the datasheet?

Eberhard

Wow.. I can't believe I missed that.

This is exactly the case (I'm using common anode leds).

Thanks a lot.