I have an issue quite similar to this one. The behavior of my MAX7221 is the following:

  1. when powering on the board the first time (let's from cold & dark) it turn on all the segments and does not respond to any SPI command
  2. turning off and on the power supply leads to the correct behavior
  3. turning off the power supply, short-circuit V+ with GND, and turning on leads to the same behavior of point 1.

Here my schematic:


Other information:

  • I checked the source of the IC: Mouser
  • I tried with different SPI clock speeds: it changes nothing. When it works, it works always. When it hangs on power on, it does not respond until a power cycle.
  • I tried with different C51 values: it changes nothing. From 0 pF to 2200 uF the behavior is exactly the same. On the 5V rail I only have another 10 uF placed close the power supply and a bunch of 100 nF placed close the other ICs.
  • the datasheet says: "Display Blanked on Power-Up" but this is not true. Even when it works correctly, on power up it shows some random segments on. Anyway, I can issue the SPI commands to turn them off.

Because after a power cycling it works fine, I bet there is something about the capacitors. Because the MAX7221 does not have a reset pin, the only idea that comes to mind is to add a power switch to turn it on after a while... but I wonder if there is a more elegant solution.

  • 2
    \$\begingroup\$ Do you have a scope? Can you check the SPI lines after the level translator? (Between TXB0106 and MAX7221) TXB series has a few quirks IIRC. \$\endgroup\$
    – Wesley Lee
    May 14, 2021 at 15:21
  • \$\begingroup\$ How is it powered and what 3.3V device controls it? \$\endgroup\$
    – Justme
    May 14, 2021 at 15:33
  • 1
    \$\begingroup\$ How are you driving the SPI bus? Is controller there power cycled too? All segments enabled is "display test" feature of the MAX7221 which is enabled by clocking in 16 or more high bits to DIN. Note that (from DS): "The MAX7219/MAX7221 remain in display-test mode (all LEDs on) until the display-test register is reconfigured for normal operation." so it would seemingly not respond to other commands. \$\endgroup\$
    – Martin
    May 14, 2021 at 15:50
  • \$\begingroup\$ @Justme, 3.3V is provided by a common 1117-3.3 and the device is an xmega \$\endgroup\$
    – Mark
    May 14, 2021 at 16:04
  • 1
    \$\begingroup\$ SPI signals would be interesting just after power-up to see if there are no spurious clock/CS cycles with DIN high. Or you need to provide more details on your xmega part of the circuit. Maybe the easiest way to find out if test-mode is what happens would be to explicitely send test-mode off (0xff 0x00) when device seems to be "stuck". \$\endgroup\$
    – Martin
    May 14, 2021 at 16:09

1 Answer 1


Partial answer, so it won't get lost in comments.

The reason for MAX7221 (seemingly) not responding to any command is the "Display Test" mode. this mode is activated by 0xF command with data LSB set to one. Because other bits are insignificant, it can be enabled by clocking in 16 "1" bits (that is DIN constant high) for example or possibly by some of-by-one error or race condition while sending other command.

In the display test mode all other control (including shutdown mode) is overridden and all segments are permanently enabled regardless of any setting. Received commands will still affect internal state/data in the chip, but not display output.

From the datasheet:

Display-Test Register

The display-test register operates in two modes: normal and display test. Display-test mode turns all LEDs on by overriding, but not altering, all controls and digit registers (including the shutdown register). In display-test mode, 8 digits are scanned and the duty cycle is 31/32 (15/16 for MAX7221).

The MAX7219/MAX7221 remain in display-test mode (all LEDs on) until the display-test register is reconfigured for normal operation.

What exactly causes enabling the test mode after "cold" start is unclear without providing more details about SPI bus controller and behavior under start-up.

  • \$\begingroup\$ I'm going to check the SPI signals on power up. If I find useful information I'll update my question. \$\endgroup\$
    – Mark
    May 14, 2021 at 20:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.