trying to connect 5 8x8 matrixes only 4 work.the first 1 from left does not.

[code]#include <avr/pgmspace.h>
#include <LedControl.h>

const int numDevices = 5;      // number of MAX7219s used
const long scrollDelay = 75;   // adjust scrolling speed

unsigned long bufferLong [14] = {0}; 

LedControl lc=LedControl(12,11,10,numDevices);

prog_uchar scrollText[] PROGMEM ={
    "  THE QUICK BROWN FOX JUMPED OVER THE LAZY DOG 1234567890 the quick brown fox jumped over the lazy dog   \0"};

void setup(){
    for (int x=0; x<numDevices; x++){
        lc.shutdown(x,false);       //The MAX72XX is in power-saving mode on startup
        lc.setIntensity(x,8);       // Set the brightness to default value
        lc.clearDisplay(x);         // and clear the display
    }
}

void loop(){ 
    scrollMessage(scrollText);
    scrollFont();
}

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////

prog_uchar font5x7 [] PROGMEM = {      //Numeric Font Matrix (Arranged as 7x font data + 1x kerning data)
    B00000000,	//Space (Char 0x20)
    B00000000,
    B00000000,
    B00000000,
    B00000000,
    B00000000,
    B00000000,
    6,

  

  
    
    B01110000,	//A
    B10001000,
    B10001000,
    B10001000,
    B11111000,
    B10001000,
    B10001000,
    6,

    B11110000,	//B
    B10001000,
    B10001000,
    B11110000,
    B10001000,
    B10001000,
    B11110000,
    6,

    B01110000,	//C
    B10001000,
    B10000000,
    B10000000,
    B10000000,
    B10001000,
    B01110000,
    6,

    B11100000,	//D
    B10010000,
    B10001000,
    B10001000,
    B10001000,
    B10010000,
    B11100000,
    6,

    B11111000,	//E
    B10000000,
    B10000000,
    B11110000,
    B10000000,
    B10000000,
    B11111000,
    6,

    B11111000,	//F
    B10000000,
    B10000000,
    B11110000,
    B10000000,
    B10000000,
    B10000000,
    6,

    B01110000,	//G
    B10001000,
    B10000000,
    B10111000,
    B10001000,
    B10001000,
    B01111000,
    6,

    B10001000,	//H
    B10001000,
    B10001000,
    B11111000,
    B10001000,
    B10001000,
    B10001000,
    6,

    B11100000,	//I
    B01000000,
    B01000000,
    B01000000,
    B01000000,
    B01000000,
    B11100000,
    4,

    B00111000,	//J
    B00010000,
    B00010000,
    B00010000,
    B00010000,
    B10010000,
    B01100000,
    6,

    B10001000,	//K
    B10010000,
    B10100000,
    B11000000,
    B10100000,
    B10010000,
    B10001000,
    6,

    B10000000,	//L
    B10000000,
    B10000000,
    B10000000,
    B10000000,
    B10000000,
    B11111000,
    6,

    B10001000,	//M
    B11011000,
    B10101000,
    B10101000,
    B10001000,
    B10001000,
    B10001000,
    6,

    B10001000,	//N
    B10001000,
    B11001000,
    B10101000,
    B10011000,
    B10001000,
    B10001000,
    6,

    B01110000,	//O
    B10001000,
    B10001000,
    B10001000,
    B10001000,
    B10001000,
    B01110000,
    6,

    B11110000,	//P
    B10001000,
    B10001000,
    B11110000,
    B10000000,
    B10000000,
    B10000000,
    6,

    B01110000,	//Q
    B10001000,
    B10001000,
    B10001000,
    B10101000,
    B10010000,
    B01101000,
    6,

    B11110000,	//R
    B10001000,
    B10001000,
    B11110000,
    B10100000,
    B10010000,
    B10001000,
    6,

    B01111000,	//S
    B10000000,
    B10000000,
    B01110000,
    B00001000,
    B00001000,
    B11110000,
    6,

    B11111000,	//T
    B00100000,
    B00100000,
    B00100000,
    B00100000,
    B00100000,
    B00100000,
    6,

    B10001000,	//U
    B10001000,
    B10001000,
    B10001000,
    B10001000,
    B10001000,
    B01110000,
    6,

    B10001000,	//V
    B10001000,
    B10001000,
    B10001000,
    B10001000,
    B01010000,
    B00100000,
    6,

    B10001000,	//W
    B10001000,
    B10001000,
    B10101000,
    B10101000,
    B10101000,
    B01010000,
    6,

    B10001000,	//X
    B10001000,
    B01010000,
    B00100000,
    B01010000,
    B10001000,
    B10001000,
    6,

    B10001000,	//Y
    B10001000,
    B10001000,
    B01010000,
    B00100000,
    B00100000,
    B00100000,
    6,

    B11111000,	//Z
    B00001000,
    B00010000,
    B00100000,
    B01000000,
    B10000000,
    B11111000,
    6,

   



    B01100000,	// (Char 0x7F)
    B10010000,
    B10010000,
    B01100000,
    B00000000,
    B00000000,
    B00000000,
    5
};

void scrollFont() {
    for (int counter=0x20;counter<0x80;counter++){
        loadBufferLong(counter);
        delay(500);
    }
}

// Scroll Message
void scrollMessage(prog_uchar * messageString) {
    int counter = 0;
    int myChar=0;
    do {
        // read back a char 
        myChar =  pgm_read_byte_near(messageString + counter); 
        if (myChar != 0){
            loadBufferLong(myChar);
        }
        counter++;
    } 
    while (myChar != 0);
}
// Load character into scroll buffer
void loadBufferLong(int ascii){
    if (ascii >= 0x20 && ascii <=0x7f){
        for (int a=0;a<7;a++){                      // Loop 7 times for a 5x7 font
            unsigned long c = pgm_read_byte_near(font5x7 + ((ascii - 0x20) * 8) + a);     // Index into character table to get row data
            unsigned long x = bufferLong [a*2];     // Load current scroll buffer
            x = x | c;                              // OR the new character onto end of current
            bufferLong [a*2] = x;                   // Store in buffer
        }
        byte count = pgm_read_byte_near(font5x7 +((ascii - 0x20) * 8) + 7);     // Index into character table for kerning data
        for (byte x=0; x<count;x++){
            rotateBufferLong();
            printBufferLong();
            delay(scrollDelay);
        }
    }
}
// Rotate the buffer
void rotateBufferLong(){
    for (int a=0;a<7;a++){                      // Loop 7 times for a 5x7 font
        unsigned long x = bufferLong [a*2];     // Get low buffer entry
        byte b = bitRead(x,31);                 // Copy high order bit that gets lost in rotation
        x = x<<1;                               // Rotate left one bit
        bufferLong [a*2] = x;                   // Store new low buffer
        x = bufferLong [a*2+1];                 // Get high buffer entry
        x = x<<1;                               // Rotate left one bit
        bitWrite(x,0,b);                        // Store saved bit
        bufferLong [a*2+1] = x;                 // Store new high buffer
    }
}  
// 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*2+1];   // Get high buffer entry
    byte y = x;                             // Mask off first character
    lc.setRow(3,a,y);                       // Send row to relevent MAX7219 chip
    x = bufferLong [a*2];                   // Get low buffer entry
    y = (x>>24);                            // Mask off second character
    lc.setRow(2,a,y);                       // Send row to relevent MAX7219 chip
    y = (x>>16);                            // Mask off third character
    lc.setRow(1,a,y);                       // Send row to relevent MAX7219 chip
    y = (x>>8);                             // Mask off forth character
    lc.setRow(0,a,y);                       // Send row to relevent MAX7219 chip
  }
}

im trying to connect 5 matrixes but the first one from the left does not light up…the others light up fine…[/code]

CHANGE YOUR TITLE TO DESCRIBE YOUR ISSUE ! WE DON'T RESPOND TO VAGUE TITLES LIKE THIS ! EVERYONE IS ASKING FOR HELP. Putting that in your title does nothing but irritate people.

raschemmel: CHANGE YOUR TITLE TO DESCRIBE YOUR ISSUE ! WE DON'T RESPOND TO VAGUE TITLES LIKE THIS ! EVERYONE IS ASKING FOR HELP. Putting that in your title does nothing but irritate people.

ok thank you for guiding me...

Sounds like a wiring issue then. You could also check the parola library, it will handle lots of displays too.

If you switch the order around, does the one on the end still not light up? I have that same library and it will work with 8 displays with no problems. The only issue I ever had was power and I solved that with a 5V @800mA cell phone charger.

HazardsMind: If you switch the order around, does the one on the end still not light up? I have that same library and it will work with 8 displays with no problems. The only issue I ever had was power and I solved that with a 5V @800mA cell phone charger.

from which side did you wire it up.. i wired it from the right to left..

You wired it correctly, Im just says to swap the displays around, not the wiring.

HazardsMind: You wired it correctly, Im just says to swap the displays around, not the wiring.

i tried does not work..

domdomgin:

HazardsMind: You wired it correctly, Im just says to swap the displays around, not the wiring.

i tried does not work..

if i change no of devices to 4 then the first one from the left displays the same characters from no1 right to no4 left matrix..

I think this has gone far enough. Please upload some decent photos showing all the connections .

raschemmel:
I think this has gone far enough. Please upload some decent photos showing all the connections .

please see the picture…i have etched the boards my self…please help…thanks…

HazardsMind: If you switch the order around, does the one on the end still not light up? I have that same library and it will work with 8 displays with no problems. The only issue I ever had was power and I solved that with a 5V @800mA cell phone charger.

can you share your code please..domdomgin@yahoo.com..thank you..

Do you have the MaxMatrix library too? Most if not all my dot matrix sketches use both the Ledcontrol and MaxMatrix libraries.

But this is one I use to see if all the displays work.

//We always have to include the library
#include "LedControl.h"

/*
 Now we need a LedControl to work with.
 ***** These pin numbers will probably not work with your hardware *****
 pin 12 is connected to the DataIn 
 pin 11 is connected to the CLK 
 pin 10 is connected to LOAD 
 ***** Please set the number of devices you have *****
 But the maximum default of 8 MAX72XX wil also work.
 */
LedControl lc=LedControl(12,11,10,4);

/* we always wait a bit between updates of the display */
unsigned long delaytime=10;
int devices;
/* 
 This time we have more than one device. 
 But all of them have to be initialized 
 individually.
 */
void setup() {
  //we have already set the number of devices when we created the LedControl
  devices = lc.getDeviceCount();
  //we have to init all devices in a loop
  for(int address = devices - 1; address >= 0;address--) 
  {
    /*The MAX72XX is in power-saving mode on startup*/
    lc.shutdown(address,false);
    /* Set the brightness to a medium values */
    lc.setIntensity(address,8);
    /* and clear the display */
    lc.clearDisplay(address);
  }
}

void loop() 
{ 
  //we have to init all devices in a loop
  for(int address = devices - 1; address >= 0;address--) 
  {
    for(int row=0;row<8;row++) 
    {
      for(int col=0;col<8;col++) 
      {
        delay(delaytime);
        lc.setLed(address,row,col,true);
        delay(delaytime);
        lc.setLed(address,row,col,false);
      }
    }
  }
}

HazardsMind:
Do you have the MaxMatrix library too? Most if not all my dot matrix sketches use both the Ledcontrol and MaxMatrix libraries.

But this is one I use to see if all the displays work.

//We always have to include the library

#include “LedControl.h”

/*
Now we need a LedControl to work with.
***** These pin numbers will probably not work with your hardware *****
pin 12 is connected to the DataIn
pin 11 is connected to the CLK
pin 10 is connected to LOAD
***** Please set the number of devices you have *****
But the maximum default of 8 MAX72XX wil also work.
*/
LedControl lc=LedControl(12,11,10,4);

/* we always wait a bit between updates of the display /
unsigned long delaytime=10;
int devices;
/

This time we have more than one device.
But all of them have to be initialized
individually.
/
void setup() {
  //we have already set the number of devices when we created the LedControl
  devices = lc.getDeviceCount();
  //we have to init all devices in a loop
  for(int address = devices - 1; address >= 0;address–)
  {
    /The MAX72XX is in power-saving mode on startup/
    lc.shutdown(address,false);
    /
Set the brightness to a medium values /
    lc.setIntensity(address,8);
    /
and clear the display */
    lc.clearDisplay(address);
  }
}

void loop()
{
  //we have to init all devices in a loop
  for(int address = devices - 1; address >= 0;address–)
  {
    for(int row=0;row<8;row++)
    {
      for(int col=0;col<8;col++)
      {
        delay(delaytime);
        lc.setLed(address,row,col,true);
        delay(delaytime);
        lc.setLed(address,row,col,false);
      }
    }
  }
}

i uploaded the code and it all worked…what do i do now…im not good at programming;;i have the maxmatrix lib…please help…

Do all 5 displays work now?

What exactly are you trying to do, your original question was that your 5th display wasn’t working.

This here is only sending it to four displays.

void printBufferLong(){
for (int a=0;a<7;a++){ // Loop 7 times for a 5x7 font
unsigned long x = bufferLong [a2+1]; // Get high buffer entry
byte y = x; // Mask off first character
** lc.setRow(3,a,y); // Send row to relevent MAX7219 chip**
__ x = bufferLong [a
2]; // Get low buffer entry__
** y = (x>>24); // Mask off second character**
** lc.setRow(2,a,y); // Send row to relevent MAX7219 chip**
** y = (x>>16); // Mask off third character**
** lc.setRow(1,a,y); // Send row to relevent MAX7219 chip**
** y = (x>>8); // Mask off forth character**
** lc.setRow(0,a,y); // Send row to relevent MAX7219 chip**
}
}

Replace it with this and see if it works. I added in: lc.setRow(4,a,y); … y = (x>>32); lc.setRow(3,a,y);

void printBufferLong(){
  for (int a=0;a<7;a++){                    // Loop 7 times for a 5x7 font
    unsigned long x = bufferLong [a*2+1];   // Get high buffer entry
    byte y = x;                             // Mask off first character
    lc.setRow(4,a,y);                       // Send row to relevent MAX7219 chip
    x = bufferLong [a*2];                   // Get low buffer entry
    y = (x>>32);                            // Mask off second character
    lc.setRow(3,a,y);                       // Send row to relevent MAX7219 chip
    y = (x>>24);                            // Mask off third character
    lc.setRow(2,a,y);                       // Send row to relevent MAX7219 chip
    y = (x>>16);                            // Mask off forth character
    lc.setRow(1,a,y);                       // Send row to relevent MAX7219 chip
    y = (x>>8);                             // Mask off fifth character
    lc.setRow(0,a,y);                       // Send row to relevent MAX7219 chip
  }
}

HazardsMind:
Do all 5 displays work now?

What exactly are you trying to do, your original question was that your 5th display wasn’t working.

This here is only sending it to four displays.

void printBufferLong(){
for (int a=0;a<7;a++){ // Loop 7 times for a 5x7 font
unsigned long x = bufferLong [a2+1]; // Get high buffer entry
byte y = x; // Mask off first character
** lc.setRow(3,a,y); // Send row to relevent MAX7219 chip**
__ x = bufferLong [a
2]; // Get low buffer entry__
** y = (x>>24); // Mask off second character**
** lc.setRow(2,a,y); // Send row to relevent MAX7219 chip**
** y = (x>>16); // Mask off third character**
** lc.setRow(1,a,y); // Send row to relevent MAX7219 chip**
** y = (x>>8); // Mask off forth character**
** lc.setRow(0,a,y); // Send row to relevent MAX7219 chip**
}
}

Replace it with this and see if it works. I added in: lc.setRow(4,a,y); … y = (x>>32); lc.setRow(3,a,y);

void printBufferLong(){

for (int a=0;a<7;a++){                    // Loop 7 times for a 5x7 font
    unsigned long x = bufferLong [a2+1];   // Get high buffer entry
    byte y = x;                             // Mask off first character
    lc.setRow(4,a,y);                       // Send row to relevent MAX7219 chip
    x = bufferLong [a
2];                   // Get low buffer entry
    y = (x>>32);                            // Mask off second character
    lc.setRow(3,a,y);                       // Send row to relevent MAX7219 chip
    y = (x>>24);                            // Mask off third character
    lc.setRow(2,a,y);                       // Send row to relevent MAX7219 chip
    y = (x>>16);                            // Mask off forth character
    lc.setRow(1,a,y);                       // Send row to relevent MAX7219 chip
    y = (x>>8);                             // Mask off fifth character
    lc.setRow(0,a,y);                       // Send row to relevent MAX7219 chip
  }
}

i uploaded the code and the it skips the 4th matix but the 5th one works now…

Try changing this unsigned long x to [u]unsigned long long x[/u]

domdomgin:

HazardsMind:
Do all 5 displays work now?

What exactly are you trying to do, your original question was that your 5th display wasn’t working.

This here is only sending it to four displays.

void printBufferLong(){
for (int a=0;a<7;a++){ // Loop 7 times for a 5x7 font
unsigned long x = bufferLong [a2+1]; // Get high buffer entry
byte y = x; // Mask off first character
** lc.setRow(3,a,y); // Send row to relevent MAX7219 chip**
__ x = bufferLong [a
2]; // Get low buffer entry__
** y = (x>>24); // Mask off second character**
** lc.setRow(2,a,y); // Send row to relevent MAX7219 chip**
** y = (x>>16); // Mask off third character**
** lc.setRow(1,a,y); // Send row to relevent MAX7219 chip**
** y = (x>>8); // Mask off forth character**
** lc.setRow(0,a,y); // Send row to relevent MAX7219 chip**
}
}

Replace it with this and see if it works. I added in: lc.setRow(4,a,y); … y = (x>>32); lc.setRow(3,a,y);

void printBufferLong(){

for (int a=0;a<7;a++){                    // Loop 7 times for a 5x7 font
    unsigned long x = bufferLong [a2+1];   // Get high buffer entry
    byte y = x;                             // Mask off first character
    lc.setRow(4,a,y);                       // Send row to relevent MAX7219 chip
    x = bufferLong [a
2];                   // Get low buffer entry
    y = (x>>32);                            // Mask off second character
    lc.setRow(3,a,y);                       // Send row to relevent MAX7219 chip
    y = (x>>24);                            // Mask off third character
    lc.setRow(2,a,y);                       // Send row to relevent MAX7219 chip
    y = (x>>16);                            // Mask off forth character
    lc.setRow(1,a,y);                       // Send row to relevent MAX7219 chip
    y = (x>>8);                             // Mask off fifth character
    lc.setRow(0,a,y);                       // Send row to relevent MAX7219 chip
  }
}

i uploaded the code and the it skips the 4th matix but the 5th one works now…

i tried changing it to long long x but still the 4th one does not work but the 5th one is working now…please can anyone help…

domdomgin:

domdomgin:

HazardsMind:
Do all 5 displays work now?

What exactly are you trying to do, your original question was that your 5th display wasn’t working.

This here is only sending it to four displays.

void printBufferLong(){
for (int a=0;a<7;a++){ // Loop 7 times for a 5x7 font
unsigned long x = bufferLong [a2+1]; // Get high buffer entry
byte y = x; // Mask off first character
** lc.setRow(3,a,y); // Send row to relevent MAX7219 chip**
__ x = bufferLong [a
2]; // Get low buffer entry__
** y = (x>>24); // Mask off second character**
** lc.setRow(2,a,y); // Send row to relevent MAX7219 chip**
** y = (x>>16); // Mask off third character**
** lc.setRow(1,a,y); // Send row to relevent MAX7219 chip**
** y = (x>>8); // Mask off forth character**
** lc.setRow(0,a,y); // Send row to relevent MAX7219 chip**
}
}

Replace it with this and see if it works. I added in: lc.setRow(4,a,y); … y = (x>>32); lc.setRow(3,a,y);

void printBufferLong(){

for (int a=0;a<7;a++){                    // Loop 7 times for a 5x7 font
    unsigned long x = bufferLong [a2+1];   // Get high buffer entry
    byte y = x;                             // Mask off first character
    lc.setRow(4,a,y);                       // Send row to relevent MAX7219 chip
    x = bufferLong [a
2];                   // Get low buffer entry
    y = (x>>32);                            // Mask off second character
    lc.setRow(3,a,y);                       // Send row to relevent MAX7219 chip
    y = (x>>24);                            // Mask off third character
    lc.setRow(2,a,y);                       // Send row to relevent MAX7219 chip
    y = (x>>16);                            // Mask off forth character
    lc.setRow(1,a,y);                       // Send row to relevent MAX7219 chip
    y = (x>>8);                             // Mask off fifth character
    lc.setRow(0,a,y);                       // Send row to relevent MAX7219 chip
  }
}

i uploaded the code and the it skips the 4th matix but the 5th one works now…

i tried changing it to long long x but still the 4th one does not work but the 5th one is working now…please can anyone help…

please can you help me

The thing is, there is no reason for the forth display not working. Disconnect the first display, now see if all 4 come on. Post a picture or video of your setup.