I have followed the tutorial here MAX7219

Now when i wire it up to a 4 Digit 7 Segment display, and run any code changing the display I get all the segments on all digits lit up

#include "LedControl.h" //  need the library
LedControl lc=LedControl(12,11,10,1); // lc is our object
// pin 12 is connected to the MAX7219 pin 1
// pin 11 is connected to the CLK pin 13
// pin 10 is connected to LOAD pin 12
// 1 as we are only using 1 MAX7219
void setup()
  // the zero refers to the MAX7219 number, it is zero for 1 chip
  lc.shutdown(0,false);// turn off power saving, enables display
  lc.setIntensity(0,8);// sets brightness (0~15 possible values)
  lc.clearDisplay(0);// clear screen
void loop()

The above code should clear the display so that all segments are off and change the 1st digit to a '0' then a '7' and loop.

No matter how I change the code this does not happen they just all stay lit up, I have even rewired a few times and tried a different IC.

Has anyone had any experience with this setup or these chips. I have read that 2 capacitors between the +5v and GND help so added them 10uF (Electrolytic) and 100nF. No yet still no change.

Any help or ideas would be great, I don't have a logic analyser to debug (Getting one at christmas!).

Thanks, Hughesy

  • \$\begingroup\$ Do you have a link to the 7 segment displays datasheet? Have you checked to see if it is common cathode or common anode? \$\endgroup\$ – Jim Oct 10 '10 at 12:09

+1 - you need a common-cathode display; and you don't need the apostrophes around the 7 or 0, for example you just use:


Have written up a fair bit about the MAX7219 here.

  • 1
    \$\begingroup\$ I used your tutorial as well, with some further study I have found out that I order the wrong part, my display is common anode not common-cathode. I will order a new part and see how I go thanks \$\endgroup\$ – Ashley Hughes Oct 10 '10 at 18:42
  • \$\begingroup\$ Neat. If you have any feedback about the article please let me know. Thank you! \$\endgroup\$ – user1307 Oct 11 '10 at 4:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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