Controlling a 2-color LED matrix with two MAX7221s

Admittedly, I'm fairly new to Arduino, wiring, and things of that nature. My project involves using weather XML data retrieved by a processing program, sending commands to my Arduino board which uses those commands to control LEDs. I made a previous iteration for a projects class last semester in which I direct wired LEDs to the Arduino without the benefit of some kind of visual driver or shift register, but now that my project has moved on into this semester, I want to make it more sophisticated.
I purchased a cheap two color 8x8 LED matrix from Sparkfun here:

The datasheet is here:

It has 24 pins and I believe two LEDs to a common cathode.
Overall, I'm kind of confused on a few things. I've read on other threads about how, because this is a two-color matrix, I need two MAX7221s to drive it. Well, that's nice, and I've found wiring schematics for wiring one to an 8x8 single color LED matrix (Arduino Playground - HomePage) but looking at my matrix, there's no kind of labeling for any of the pins. Also, if it was as simple as just doubling up the pins for the LEDs, then there would be at least 36, wouldn't there? I'm not sure how I should go about wiring it; I've got a sneaking suspicion just wiring random wires to random pins won't have the effect I want and I'm not sure how to wire the two MAX7221s together in the first place. Also, seeing as how I've never used a visual driver or shift register before and I can't seem to find any sort of guide or tutorial that really explains how, I was wondering if someone could let me know how I should go about coding this. My intent is that each LED responds to a different variable, so how hard is it to make that happen?

I found this "tutorial" http://www.bryanchung.net/?p=177, and it looks like he might be controlling specific LEDs at points, but I have no idea how he's naming them.
I've also seen this thread http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1200123531 but I feel like as far as the actual wiring goes, that's knowledge I don't have and therefore can't really act on this.

Any help in any of these areas is greatly appreciated. I'm worried that sometimes this is too technical, but I'm committed now as I've submitted the proposal, bought the hardware, and kind of need to pull this off.

It seems that you missed this article, the most important of them all:
http://www.arduino.cc/playground/Main/MultiplexMAX72xx

This does seem to clear up a good amount of things.
Still, how would the code look using this to say, just light up one of the LEDs as orange, for example? If I could see that I feel like I could wrap my head around it a little better. Also, I'm still not sure which pins are which on my matrix.

Thanks, though. This did answer plenty of questions.

I use the same matrix as you are using. So this schematic will give you right pin numbers and show you how to wire it up.
Imgur

Ah, okay. So one side is for red and one side is for green, is it? Should I just do trial and error to find out which is which?

@blade

The example at the bottom of the article gives you all the "base code" you need. By this I mean, the ISR and the "wrappers" for the LedControl lib. You'd start with pretty much all that except the SkipRows function.

Then you make the same calls as you would for the LedControl lib but you call the wrapper.

So for instance, if you want to light orange in Row 1, Col 2, you world call . . .

SetLed(GREEN, 1,2, true)
SetLed(RED, 1,2, true)

That's it! Understanding what the LedControl lib gives you will help.

Ah, okay. So one side is for red and one side is for green, is it? Should I just do trial and error to find out which is which?

No trial and error! Look at the data sheet. The numbers in the circles are the pin # and the Row and col numbers are shown. The layout for which pin # is which is also shown. (I found it helpful to take a marker and write on the back of the matrix.

Thanks, you've been fantastic. I'll keep this thread posted with my progress, and if I have any problems.

Brohogan, How would you set up the MAX chips to drive three of the 8x8 bicolor matrices?

Theoretically by using 6 MAX7221's in 2 chains of 3. You'd alternately shut down each set of 3.

But I hesitate to advise you to try this for the following reasons:

  • It's $40 worth of chips! - I have no first hand knowledge that it would work - There might be a better way

Re # 2, you might read through this thread and draw your own conclusions.
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1221441492
Now he was trying 2, 3 color matrices (still 6 chips), and I think that's more time critical than 3, 2 color matrices. But you'd still be a pioneer! :slight_smile:

Maybe someone can suggest a better alternative. However if you want to go for it, you'll need initiative, and lots of jumper wires. :wink: