How many max7219s can arduino nano 328 control?

I'm so determined to get this working....I have two 8x8 one color matrices scrolling beautifully...making the 16x8 display.....each controlled by its own max7219 , caps are placed for each and They are cascaded ( Dout to Din) so anyways, I hooked up two more matrices making the 32x8 display....cascaded them as well. Caps for each chip there too....so recap, 4 chips, 4 matrices, the Rset resistor and 8 caps ( 2 for each chip) but only two of the four matrices are scrolling....the other two are blank....there was signs the chips turn on due to the matrices initially totally lighting up, but when it scrolls from right to left, it goes from matrix 1 to 2 but nothing when its 3's turn.....I will paste my code tomorrow as I just left work....the loads are in parallel for each, the clocks are as well.

Aaron_dyer:
I'm so determined to get this working....I have two 8x8 one color matrices scrolling beautifully...making the 16x8 display.....each controlled by its own max7219 , caps are placed for each and They are cascaded ( Dout to Din) so anyways, I hooked up two more matrices making the 32x8 display....cascaded them as well. Caps for each chip there too....so recap, 4 chips, 4 matrices, the Rset resistor and 8 caps ( 2 for each chip) but only two of the four matrices are scrolling....the other two are blank....there was signs the chips turn on due to the matrices initially totally lighting up, but when it scrolls from right to left, it goes from matrix 1 to 2 but nothing when its 3's turn.....I will paste my code tomorrow as I just left work....the loads are in parallel for each, the clocks are as well.

I don't think there's any theoretical limit to how many they can control (if there is it's down to good electronic design - getting clean signals to the chips). Four chips should be no problem at all.

If two are working I suspect a software problem...

Not sure there is a hard and fast limit to how many MAX7219s can be cascaded. I suppose there will be practical considerations, though. The LedControl library will control up to eight cascaded devices, but if you're doing your own thing then I think that could be increased. What they are controlled by (Nano 328 or whatever) is pretty much irrelevant.

Well I am using the LedControl library.....but as I said I will paste my code in the morning, maybe someone can look at it and see what I'm not seeing. But ya all four are cascaded, scrolling from right to left , the furthest matrix right scrolls to the next one left, but then that's it.....the 3rd and 4 th are blank......

I had a similar problem with cascaded LED drivers ( mine were latched shift registers but it might apply ? )

The current for the LEDs was returning through a small connector and wires to the power supply, and the slight voltage drop was corrupting the data, by hooking all the grounds and supplies with a separate pair of wires to each panel cured it in my case.

Boffin1:
I had a similar problem with cascaded LED drivers ( mine were latched shift registers but it might apply ? )

The current for the LEDs was returning through a small connector and wires to the power supply, and the slight voltage drop was corrupting the data, by hooking all the grounds and supplies with a separate pair of wires to each panel cured it in my case.

That would do it...

A voltage drop along a ground wire would mean Arduino ground wasn't the same as one of the panel grounds. Good grounding is essential, this is the sort of thing that electronics engineers from mere mortals.

Ok guys, so I have looked over my PCB and probed EVERYTHING! All grounds are in common along a plane...this would be the arduino GND, The GNDs for all of the Max7219 pins 4 and 9 and all the negative polarity side of any electrolytic caps I use. (As well as the ceramics) but those aren't polarized..so it doesn't matter which side of those caps is grounded.....

All +5 V are present at Pin 19 on all 4 max7219s and the + 5 is coming from the + 5 Output from the arduino....I have a power supply powering the arduino via it's V in at 8 Volts which is a safe input supply....

I am using 27 K resistors for each of the max7219s which are all sharing the + 5 volt plane....(this is pin 18)

So the 4 max7219's are daisy chained or (Cascaded) from the arduino the Clk output is in parallel to all 4 chips and the load output is in parallel to all the chips......Then I have serial data going from arduino to first max7219 D in and then cascaded from D out to the next chip's D in....and so on for the rest....

I have ohmed everything and gotten good continuity on all connections....I am using 4 100 u F caps as well as 0.1 u F caps to suprress any noise on each of the chips + 5 / GND lines.....

I am positive the Rows and columns of the matrices are good...

I have four 8 x 8 matrices making the 32 x 8 display...

if you think of this:

[ 4th matrix ] [ 3rd matrix ] [ 2nd matrix ] [ 1st matrix ] ....laid out like this on the board...

[4th max7219] [3rd max7219] [ 2nd max7219] [1st max7219] ......laid out right under the matrices.....

all resistors and caps in place and all V + and GNDs are good and in common......

the display scrolls from right to left from matrix 1 over to matrix 2 and then leaves 3 and 4 blank.......

I don't get it....

I have attached my schematic I made in EAGLE and my Code and the pinout I'm using for the max7219...

someone please help....

Scroll_Across.ino (13.3 KB)

OK !!! I GOT IT....Iwant to thank Pedro for referring to JoeN...I used his sample code to get my 32 x 8 working..FINALLY!!!!!!

My code is attached..I'll make a video of it tonight.....

THE_BEST_SCROLL_32x8.ino (9.58 KB)

Aaron_dyer:
OK !!! I GOT IT....Iwant to thank Pedro for referring to JoeN...I used his sample code to get my 32 x 8 working..FINALLY!!!!!!

The previous code you was using that only scrolled through 2x matrix was written specifically (hard coded) to scroll only 2

// Display Buffer on LED matrix
void printBufferLong(){
  for (int a=0;a<7;a++){                    // Loop 7 times for a 5x7 font
    unsigned long x = bufferLong [a];       // Get buffer entry
    int y = (x>>16) & 0xff;                   // Mask off left hand character
    lc.setRow(1,a,y);                       // Send row to relevent MAX7219 chip
   y = (x>>8) & 0xff;                        // Mask off right hand character
    lc.setRow(0,a,y);                       // Send row to relevent MAX7219 chip
  }
}

The way it works it could do a third with the addition of just a couple of lines of code and tweaks but to do more than 3 matrix displays it would need more coding and memory (28 bytes) to hold scroll buffers and then it could do 7 displays.