MAX7219 keeps turning all LEDs ON on initial power up

Hi guys,

i`ve a little problem with my MAX7219 and a 5 digit 7segment display.

Here are all necessary facts:

Set-Up:
2-layer PCB, MAX7219 as SIOP24 SMD Package, Current Resistor is 33k, 5V Power Supply over VCC Plane with decoupling capacitor, ground plane. Connection between µC and 7219 is less than 1 inch.
Display is an "3651AB" 5digit 7-segment common cathode display(chineese). Controller is an Teensie 3.2, the MAX7219 is connected to GPIOs.

When i power up the PCB all 5 digits are turned on and yes.. this is all.. The Datasheet of the 7219 says:

"On initial power-up, all control registers are reset, the
display is blanked, and the MAX7219/MAX7221 enter
shutdown mode."

So my MAX7219 wont even start his basic startup routine even before i applied any kind of code to him..

Any ideas what could cause him to be so "enlightening" without my permission?..

Even through he`s firing up the leds all the time i tried to shut him down with attached code. (without success). My scope says the controller is sending the data correctly..

_7Segment_display.ino (729 Bytes)

Your MAX7219 is in Display Test Mode.
Write a zero to the Display Test Register (0x0F) to get it out of Display Test Mode.

You may want to do some more initialisation:

Display Test (0x0F) = 0
Shutdown (0x0C) = 1 (0 for shutdown, 1 for normal operation)
Decode Mode (0x09) = 0
Scan Limit (0x0B) = 4 (to scan only 5 digits in your case)
Intensity (0x0A) = 0x01 (low) .. 0x0F (high)

Put a 10k resistor from the CS line to 5 V.

CS (Load) should not need a pullup if a uC is driving it. I've never had to use one.

I bet the pullup on CS would prevent the MAX from clocking in garbage during startup while the micro resets.

It depends.

If he cannot control it with code, either the code is wrong or it is a common anode display.

If the display flashes on startup and then initialises correctly, it is due to transients or AC on the control lines on switch-on, before the Arduino boots, and holding the CS high (or low) suppresses that.

Jobi-Wan:
I bet the pullup on CS would prevent the MAX from clocking in garbage during startup while the micro resets.

Correct.

Thanks for all the answers.

Good news: the Max is now doing what i want.

The bad news: I cannot tell you why. Today in the morning i turned in on with the exact same code from yesterday and the Display turned on once and then was turned of by the controller as expected.. I will add that Pullup as you recommended and i hope i wont have this problem anymore!

Thank you guys!

The pullup resistor works like charm upon startup (I put 10k)