Max7221 - cascading two units for 8x16 array.

Hi,

I've wired up an 8 rows x 16 column LED matrix, cathode to cathode, anode to anode. I tested and I can correctly light up one LED at a time EDIT: I tested by running blink sketch and touching wires to the columns/rows, not with the LED driver connected. I'm new to the MAX7219/7221. Was that the right way to wire it up to control with 2 MAX7221s? Or was I supposed to set it up as two separate 8x8 matrices? Before I continue the project, I just want to be sure I didn't make a wrong assumption.

Also--before I start soldering to the LED controller, how can I quickly check the orientation of the array to make sure I did it properly cathode/anode? I know that it is a diode so light only flows one way, but I get a little confused. The LEDs aren't really visible in the array any more so visual inspection won't work.

Hi. You should wire it as 2 8x8 matrices. It will work with either the anodes or cathodes on the horizontal rows. But it may make it easier or more complex to write your sketch, depending what information you want to display. For example scrolling text would be easier with cathodes in columns.

Paul

Thanks. Is it possible for me to control it with the 8x16 array, or do I need to redo it? It will make my protoboard more crowded.

I don't need to scroll text, this is the ubiquitous word clock project. Discrete groups of LEDs will be lit at a time, but the "matrix" nature of the word clock is just incidentally a convenient way to address 106 LEDs.

You can drive a 16x8 matrix by using transistors & shift registers, but that will require many more components than using 2 max chips.

If you want an 8x16 matrix display and want to keep things very compact and simple, I'd suggest looking at the adafruit LED matrix breakout/backpack.

It is pretty cost effective as well.
This will allow controlling all the LEDs as a single 16x8 matrix.
I used one of these along with a Teensy board for a Word clock and it was nice to be able to use I2C for both the RTC and the matrix.
It really simplified all the wiring.

I had originally started using 7221 chips but the wiring became a mess and I had very limited room in the IKEA frame I selected. The only way to get everything to fit was to switch to the adafruit module.

If you want I can post some photos.

--- bill

nano2001:
Thanks. Is it possible for me to control it with the 8x16 array,

With MAX7221s?

It is, but it is preferable to use two separate 8 by 8 arrays both for code convenience and for brightness though I note in your other thread that you also want to minimise current.

Using MAX7221s (but not MAX7219s) you can common the cathode drivers of both chips with the array and use the two alternate sets of anode drivers for the 16 dimension. You then chain the control lines to the MAX7221s and code it so you disable each and enable the other (in that order of course) alternately at a(n approximately) 100 Hz switching rate. But then you are needing in effect to perform software multiplexing.

Just use 2 and the parola.h library
https://parola.codeplex.com/

nano2001:
Thanks. Is it possible for me to control it with the 8x16 array, or do I need to redo it? It will make my protoboard more crowded.

Not sure what you mean by "redo". If you have made a 8 x 16 array, it should be possible to simply cut the connections between the first and second group of 8 columns and wire them as two separate 8 x 8 arrays. What would be the problem here?

Paul__B:
Not sure what you mean by "redo". If you have made a 8 x 16 array, it should be possible to simply cut the connections between the first and second group of 8 columns and wire them as two separate 8 x 8 arrays. What would be the problem here?

Quite right, that's what I ended up doing after listening to the advice in this thread. I haven't finished the project yet.

When I said redo, I really meant making room in my layout for the 8 extra wires. I'm using screw terminals so it actually ends up being quite a bit of extra room, but I did it that way to do it "right"