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

I need to connect 4 MAX7219 chips (to drive 2 bicolor 8x8 LED Matricies). Do I need to put pair of decoupling capacitors (ceramic and polarized) near each IC or one pair will be enough for 4? I had no issues using 1 pair for 2 chips, but not sure what will happen if I use 4.
I'm basing my design on this schematic: Arduino Playground - MAX72XXHardware

1 pair each. Lot of current draw in each part, caps add local current buffering.

CrossRoads:
1 pair each. Lot of current draw in each part, caps add local current buffering.

Thank you!

I'm with Crossroads in both caps per chip but minimum should be a 0.1uF per chip and maybe 10uF a pair.
Are you intending on driving both colours from same chip of different chip. Same seems possible but from different will probably be a headache.

Riva:
I'm with Crossroads in both caps per chip but minimum should be a 0.1uF per chip and maybe 10uF a pair.
Are you intending on driving both colours from same chip of different chip. Same seems possible but from different will probably be a headache.

Are you sure it's possible to drive both colors with same chip? How? If it's possible, I'd love to do it instead of using separate chip for each color...

"To minimize power-supply ripple due to the peak digit driver currents, connect a 10?F electrolytic and a 0.1?F
ceramic capacitor between V+ and GND as close to the device as possible. The MAX7219/MAX7221 should
be placed in close proximity to the LED display, and connections should be kept as short as possible to
minimize the effects of wiring inductance and electromagnetic interference. Also, both GND pins must be
connected to ground."

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.

You can't really share the cathodes between MAX7219s by alternately putting each chip into shutdown - they don't stop driving their outputs.
I could see doing that with a MAX7221:

"When the MAX7219 is in shutdown mode, the scan oscillator is halted, all segment current sources are pulled to
ground, and all digit drivers are pulled to V+, thereby blanking the display. The MAX7221 is identical, except
the drivers are high-impedance. Data in the digit and control registers remains unaltered. Shutdown can be
used to save power or as an alarm to flash the display by successively entering and leaving shutdown mode. For
minimum supply current in shutdown mode, logic inputs should be at ground or V+ (CMOS-logic levels)."

I suppose if the cathodes were only weakly driven high, the 2nd device could pull it low.
The software would have to coordinate which device was shut down to prevent drive conflicts.

In Shutdown:
Digit Drive Source Current (MAX7219 only) IDIGIT. Digit off, VDIGIT = (V+ - 0.3V): -2 mA minimum
Segment Drive Sink Current (MAX7219 only) ISEG. Segment off, VSEG = 0.3V: 5 mA

When Active:
Digit Drive Sink Current IDIGIT. V+ = 5V, VOUT = 0.65V: 320 mA min.

So I suppose if 1 part is sourcing -2mA to make the cathode High, and the other is pulling 320mA to make it Low, it's going Low!

That would achieve one color or the other - would alternating quickly give the perception of combined color?

Hmm, or maybe put 0.3V schottky diodes on the cathode drivers so they could only sink current and not be able to source.
If the anodes for that color are already low, then driving the cathodes high at the same time just seems like overkill, would you agree?

I have a project right now with a daisy chain of 20 MAX7219s driving 20 8x8 monochrome matricies (the 0.8" "cute" matricies from Adafruit in a 4x5 configuration). I have one 10uF tantalum cap on each chip (and one on the 1284 plus 2 22pF caps on the crystal) and it seems to be working fine. Obviously this is a lab environment with a really nice power supply. It draws 60-70mA @ 5V. Hopefully it continues to behave, I don't think I have room for a second cap the way I have set up the board.

Schematic n code?

Like Rita said....

I'm with Crossroads in both caps per chip but minimum should be a 0.1uF per chip and maybe 10uF a pair.

I'm going to need to redo the caps I have.....

check out my WIP

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?