Go Down

Topic: How many max7219s can arduino nano 328 control? (Read 1 time) previous topic - next topic

fungus


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.
No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

Aaron_dyer

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....

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!!!!!! 

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

Riva


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
Code: [Select]
// 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.

Go Up