Go Down

Topic: Unstable display with Max7219 (Read 2424 times) previous topic - next topic


Hi Everyone,

I feel BAD playing with my freeduino and my Max7219 to display graphics on a 8x8 led matrix. I think I got all the wiring ok, but the display is somewhat unstable. You can get a video here:


Basically, what my code does is to light all leds on the display then wait one second, then clear the display, then wait one second and starover. It does not light all the lights, sometime its a line, sometime is only the half of the display... I really don't know what to do with this, but I feel like I BUSTED my IC because I've been wiring it badly the first time I used it. I wanted to know is someone has an idea about this before I give up  :'(

I also tried with other graphics (a dot or a line) but I get the same behavior.


p.s.: code of my program:

Code: [Select]

#include "LedControl.h"

// Led matrix
// Create a new LedControl.
 // Pin 2 = DATA IN-pin (1) of MAX7219
 // pin 4 = CLK-pin (13) of MAX7219
 // pin 3 = LOAD-pin(12) of MAX7219      
LedControl gMatrix1 = LedControl(2, 4, 3, 1);

// Setup function
void setup() {
 //wake up the MAX72XX from power-saving mode
  gMatrix1.shutdown(0, false);
  //set a medium brightness for the Leds
  gMatrix1.setIntensity(0, 8);

// Main loop function
void loop() {
 for (int i = 0; i < 8; i++) {
   for (int j = 0; j < 8; j++) {


I haven't used that library so I am not acquainted with it.

However from looking at the video I would say it looks like the basic multiplexing is working because you can't get patterns like that if it's not. Therefore what is probably wrong is the wiring feeding the data to the Max chip, either data or clock.
I never did like bread board because it does produce these sorts of problems. Try placing your hands over the wires and chips and pressing down slightly and see if your movements can affect the pattern you see in any decernable way. In that way you can be sure you have an intermittent joint.

But the good news is I think you chip is OK. :)


Did you add the filter caps shown in this schematic?


I've seen comments from people who say that these chips seem to be sensitive to noise.

I build a scrolling display with 8 of them and I'm still having problems with the last block in the chain occasionally just turning on all of the LED's and getting stuck there until I power it off and back on.


Dec 23, 2008, 08:37 pm Last Edit: Dec 23, 2008, 08:40 pm by BroHogan Reason: 1
I don't see anything wrong with your code. (You could try a little delay(5) within your loop, but it should be OK.)

What value are you using for Iset? (~22K?). (Don't see it in vid.)

And yes, 10uF across the power wouldn't be a bad idea.

Post a close up pic of your board if you can.

I'll keep looking  :) Your very close.  ;)
"Data is not information, information is not knowledge, knowledge is not understanding, understanding is not wisdom."
~ Clifford Stoll


Dec 23, 2008, 09:06 pm Last Edit: Dec 23, 2008, 09:21 pm by Guli Reason: 1
Hi all, thanks for your quick respones!

Well, I missed the part about the capacitators in the datasheet... actually, don't I think I know how to read a datasheet properly  :D I'm learning in a raw fashion. I also guess I put the Rset too low (I used a 4k7 resistor). I saw in datasheet and in the doc provided by dogsop that the resistant should be higher than that.

I'm gonna start by fixing those two problems. It will surely help! I'll update this post when I get further improvments ;) Thanks again!

BTY here are the pics of my circuit... sorry it looks like a mess since I don't get much space on the board.

You get more detailed pictures on the link I provided on the first post if needed.


Looks pretty neat compared to mine !   ;D


Horray! it seems to work now.  :D

I added the two capacitators specified in the link provided by dogsop (http://www.arduino.cc/playground/Main/MAX72XXHardware). Also, I changed the RSet value to 20k, my 4k7 was way too low. And I think the main error was due to the resistance value because Itried to remove the capacitators from the circuit and it was functionning ok. I'm leaving the capacitators there anyway, but this was a funny thing I noticed.

So everything is great, thanks everyone for your precious hints!  ;)



Where did you get your LED Array from btw? Is it common anode?

Go Up