SparkFun dual color LED matrix and MAX7219

So I got a couple of MAX7219’s and a dial color LED matrix from sparkfun, and I was wondering how to hook them up? If I use a single MAX7219, do I only get access to 1 color, or can I select the color that is displayed?

Yes, with only 1 MAX7219 you will only be able to control 1 color (red or green) if you want to use all of the 8x8 matrix.

I had a project where I ran the Sparkfun matrix with 2 MAX7219's. It was a little tricky because essentially there are 16 LEDs hooked to a common cathode for each of the 8 rows on that display.

Take a look at . . . http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1200123531 for more info.

Some points to note: Even though there is talk on that thread about how only the MAX7221's can be tied together in that way, I went back and plugged in MAX7219's and it worked as well.

How it works is not the best. Sometimes when looping through and lighting up the whole display a few LEDs would not light. Sometimes a few would remain lit after the matrix was cleared.

However my needs were not critical and I was able to live with it. I also think my code may not be optimized well for the alternate shutdown of the MAX chips that is required. (If anyone could comment on the technique, I'd appreciate it.)

Finally, there may be other ways to drive both colors, but I'm not aware of them. (I always had the feeling I was doing it the hard way!) Maybe someone has another approach. I'd be glad to help with the approach I used if you need more info.

Good luck, John

So how do you get one specific color to turn on? I count 16 pins, for 64*2 LEDs?

Yes, with only 1 MAX7219 you will only be able to control 1 color (red or green) if you want to use all of the 8x8 matrix.

I had a project where I ran the Sparkfun matrix with 2 MAX7219's. It was a little tricky because essentially there are 16 LEDs hooked to a common cathode for each of the 8 rows on that display.

Take a look at . . . http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1200123531 for more info.

Some points to note: Even though there is talk on that thread about how only the MAX7221's can be tied together in that way, I went back and plugged in MAX7219's and it worked as well.

How it works is not the best. Sometimes when looping through and lighting up the whole display a few LEDs would not light. Sometimes a few would remain lit after the matrix was cleared.

However my needs were not critical and I was able to live with it. I also think my code may not be optimized well for the alternate shutdown of the MAX chips that is required. (If anyone could comment on the technique, I'd appreciate it.)

Finally, there may be other ways to drive both colors, but I'm not aware of them. (I always had the feeling I was doing it the hard way!) Maybe someone has another approach. I'd be glad to help with the approach I used if you need more info.

Good luck, John

How did you hook up the 2 7219's with the matrix?

Are you sure there are only 16 pins? I have dual color "medium" and the "small" and they have [u]24[/u] pins - 8 for rows, 8 for red columns, and 8 for green columns.

Perhaps you have the one with a backpack? If so, I think it's serial and you don't need the MAX.

If you do indeed have 24 pins, then start by getting the data sheet for the matrix (i.e. http://www.sparkfun.com/datasheets/Components/FYM-20881ABxx.pdf and for the MAX.

Once you have that understanding, we can go further.

ah whoops im a failure at counting. yup, 2 rows of 12 pins. Ok got the datasheets as well

In the Playground you will find lots of info on the MAX7219 with hardware and software examples. (http://www.arduino.cc/playground/Main/LEDMatrix

I'd suggest using the LedControl lib and breadboard 1 chip and 1 color.

Some tips: - there are schematics in the Playground - digits are rows, segments are columns. - on the chip "SEG DP" is Col 1, "SEG A" is Col 2, etc. - I used 26K for ISET and V+ is 5V

Once you get 1 chip and 1 color working, add the second chip - DOUT on first chip to DIN on second - CLK & LOAD tied together - [u]all the rows on the first chip tied to the same row numbers on the second chip[/u] - all the segments on the 2nd chip to the columns for the other color

Then add the function to your sketch that alternates the shutdown between the two chips.

The above is the recipe I used anyway.

John

Thanks! finally got it working :)

That's great! Do you have both colors working?

Do you have any problems like the occasional LED not lighting or clearing?

If no, did you use the ISR in my example?

These 2 color Sparkfun matrices (without the backpack) are cheep. As far as I can tell, we are the few who have got them working. So anything you can post about your experience may help others. I'd volunteer to add something to MAX7219 Playground page.

Well I only have one 7219 on me at the moment, so i got green to work. Once my other 7219 comes I'll try out dual colors. With one color, nope no problems with the LED not clearing.