MAX7219 in daisy chain. How many decop capacitors I need?

Riva ****** I'm sorry about that.....I said Rita before

Taken from the Playground site we are mentioning here...I have it in my posting about the scrolling on matrices.....

"By no means these 2 capacitors can be ommitted (Left out), as it might lead to sporadic or permanent malfunctions. These types of errors are really hard to track down. Both capacitors must be placed as near as possible to the V+ and the Gnd pins of the MAX72XX. "

I need to re place the caps closer.....and not just on Vcc and ground planes.....

I'm also curious about driving dual color matrix. Typically a matrix would have a shared cathode and 2 sets of anodes for the 2 colors, so 24 pins total on the matrix.

I don't think it would be easy to drive bi-colour led using separate MAX7219 chips because of the way they do all the row and column scanning on chip but if your using common anode bi-colour LED's and double up the segment to anode and maintain the separate cathode to digit then it could maybe work but be a right nightmare to program.

photo.JPG

Here's schematic that I came up with for 4 MAX2719 chips. I just started to learn Eagle (pretty much my first diagram), so it might be laughable, but hopefully it's correct :slight_smile:
I connected common Anodes (SEGA-G pins) together, but Eagle is cursing with Errors "More than one OUPUT pin on net N$...". I hope I can safely ignore those errors...
Now just looking at PCB mess I'm already having nightmares :slight_smile:

BiColor_2Matrix_02.sch (497 KB)

I'm worried your idea will run into problems as you cannot sync the scanning between the MAX7219 chips. I foolishly think the below may be betterwork as your not connecting between driver chips. I only drew one led as I'm meant to me working.

untitled.pdf (4.78 KB)

Ya I was starting to doubt myself...I have been reading this page over and over regarding cascading the max7219...

http://www.arduino.cc/playground/Main/MAX72XXHardware

Crossroads has been helping me, but I just can't get it to scroll anything on the matrices....

I think I'm going to switch up the wiring to cascade it like the playground has it...and then try to find some example code..or come up with something....

any example code reference would be great...

Just keep in mind, I'm using a Mega2560..

so SCK = 52

MOSI = 51

SS (LOAD) = 53

Grab the LedControl library Arduino Playground - HomePage if you don't already have it
and try the scrolling demo attached. It's written for a single 8x8 matrix running on an UNO but should work on upto a 24x8 matrix with little alteration. As it uses the LedControl library it bitbangs instead of using the SPI interface.

ScrollTest4MAX.ino (14.2 KB)

Heres my latest update:

so I have cascaded them now...data out from 1st max7219 -> data in to next one....and so on for 4 of them to control the 32 x 8 (4 matrices..)

Its a tight enclosure...I fixed numerous issues...

I had the Rset on the 2nd max7219 on pin 17 not 18......fixed that..so the 2nd Matrix is ok now.....I was about to replace the chip too, but I saw that right at the end....

heres my code working in the enclosure... (Attached)

the problem with the LedControl Library is 1.0.1 doesn't support it, even when I exclude SPI...so which IDE version do you have?

The only other thing that is bothering me ..well two things actually...

so the matrices don't scroll across each other, they just all show the same letter as each individual matrix scrolls...

AND The letters are Backwards.....and before you think anything there, I already swapped the wires around thinking it was wired in backwards, but that made it worse.....

Latest_Box_Working_somewhat.ino (65.3 KB)

Riva:
I'm worried your idea will run into problems as you cannot sync the scanning between the MAX7219 chips. I foolishly think the below may be betterwork as your not connecting between driver chips. I only drew one led as I'm meant to me working.

Oh right, diodes! I didn't think of that, thanks!
This is getting a way too complex for me. I'll never be able to tone transfer something like this :frowning: About ready to give up on the idea....

oooohh PCB in Eagle is Tough...we're trying to make a board on a board machine and I hate the traces in the rats nest...

does anyone have an idea about why the scroll letters would be backwards?

i had a garbage LedControl Library...I deleted it and downloaded / extracted the other one...so I think I may be in business now....

Aaron_dyer:
i had a garbage LedControl Library...I deleted it and downloaded / extracted the other one...so I think I may be in business now....

I was in the process of zipping and uploading my LedControl library as it works fine on 1.0.1. I won't bother now as you have got it working.

As to the text being backwards that's probably down to either wrongly defined font matrix or wiring I'm afraid.

Aaron_dyer:
i had a garbage LedControl Library...I deleted it and downloaded / extracted the other one...so I think I may be in business now....

Yeah I had same issue. There's outdated library out there. New one works fine with 1.0.1 and has some nice examples too. Thanks for hijacking my thread btw :roll_eyes:

"does anyone have an idea about why the scroll letters would be backwards? "
Easy to fix: change these to count from 8 to 1 instead of 1 to 8:

    digitRegister = 0x01;  // digit0, up to 0x08 for digit7
    digitalWrite (ss3, LOW);
    for (x = displayStart; x<(displayStart +8); x=x+1){  
      SPI.transfer (digitRegister);
      SPI.transfer(displayArray[x]);
      digitRegister = digitRegister+1;
    }
    digitalWrite (ss3, HIGH);

Here's how I did it:

  //Serial.print ("digit 0: ");
  startX = displayStart + 7;
  endX = displayStart-1;
  digitRegister = 0x01;  // digit0, up to 0x08 for digit7
  for (x = startX; x>endX; x=x-1){  
    digitalWrite (ss0, LOW);
    SPI.transfer (digitRegister);
    SPI.transfer(displayArray[x]);
    digitalWrite (ss0, HIGH);
    /*
    Serial.print (" R");
    Serial.print (digitRegister);
    Serial.print (" ");
    Serial.print (displayArray[x],HEX);
    */
    digitRegister = digitRegister+1;
  }
  //Serial.println(";");

  // next digit
  //Serial.print ("digit 1: ");
  startX = displayStart + 15;
  endX = displayStart + 7 ;
  digitRegister = 0x01;  // digit0, up to 0x08 for digit7
  for (x = startX; x>endX; x=x-1){  
    digitalWrite (ss1, LOW);
    SPI.transfer (digitRegister);
    SPI.transfer(displayArray[x]);
    digitalWrite (ss1, HIGH);
    /*
    Serial.print (" R");
    Serial.print (digitRegister);
    Serial.print (" ");
    Serial.print (displayArray[x],HEX);
    */
    digitRegister = digitRegister+1;
  }
  //Serial.println(";");

  // next digit
  //Serial.print ("digit 2: ");
  startX = displayStart + 23;
  endX = displayStart + 15;
  digitRegister = 0x01;  // digit0, up to 0x80 for digit7
  for (x = startX; x>endX; x=x-1){  
    digitalWrite (ss2, LOW);
    SPI.transfer (digitRegister);
    SPI.transfer (displayArray[x]);
    digitalWrite (ss2, HIGH);
    /*
    Serial.print (" R");
    Serial.print (digitRegister);
    Serial.print (" ");
    Serial.print (displayArray[x],HEX);
    */
    digitRegister = digitRegister+1;
  }
  //Serial.println(";");

  // next digit
  //Serial.print ("digit 3: ");
  startX = displayStart + 31;
  endX = displayStart +23;
  digitRegister = 0x01;  // digit0, up to 0x80 for digit7
  for (x = startX; x>endX; x=x-1){  
    digitalWrite (ss3, LOW);
    SPI.transfer (digitRegister);
    SPI.transfer(displayArray[x]);
    digitalWrite (ss3, HIGH);
    /*
    Serial.print (" R");
    Serial.print (digitRegister);
    Serial.print (" ");
    Serial.print (displayArray[x], HEX);
    */
    digitRegister = digitRegister+1;
  }

I'll def. Try to fix some code tomorrow......ans the wiring is def. Good...I swapped wiring on a matrix earlier and it was all jacked up......in my string right now I have each matrix displaying the same letter as it scrolls and so letters aren't backwards, I had the string "MAXIMUM" because those letters backwards or not its the same. But like I said, all matrices say M and then all say A and so on.

MAXIMUM :slight_smile: That's clever

Aaron_dyer:
I'll def. Try to fix some code tomorrow......ans the wiring is def. Good...I swapped wiring on a matrix earlier and it was all jacked up......in my string right now I have each matrix displaying the same letter as it scrolls and so letters aren't backwards, I had the string "MAXIMUM" because those letters backwards or not its the same. But like I said, all matrices say M and then all say A and so on.

When you altered the wiring you only need to alter the column order or row order (depending on what way the mirroring occurs) but not both.

With the wiring though, I triple checked the datasheet for the matrix and the max7219 outputs.....they were good.....

Here is a video I took of it last night....the matrices working are 2 minutes in.....you'll see what I'm talking about with each matrix displaying the same letter and not scrolling across each other...

With the wiring though, I triple checked the datasheet for the matrix and the max7219 outputs.....they were good.....

I only suggested this because I made the schoolboy error of wiring up as per instructions using a hand built LED matrix to realize when I turned the board over to the front that the columns were now backwards. Not as bad as wiring up a 28 pin Amphenol connector and discovering the shell was still on the bench.

"when I turned the board over to the front that the columns were now backwards"
But you can fix that in software - swap the bytes end for end that go to the max7219 registers:
Data intended for Register1 goes to Register8, and data for Register8 goes to Register1 instead.