Go Down

Topic: LED matrix : common anode vs common cathode is there a difference? (Read 7 times) previous topic - next topic

straddlethemoon

#5
Aug 03, 2012, 06:24 pm Last Edit: Aug 03, 2012, 06:28 pm by straddlethemoon Reason: 1

I think if you have 2 MAX7219 trying to drive a 16x8 matrix (2 color) or 3 driving a 24x8 matrix (RGB) there would be a lot of interference between chips as they each try and drive the anodes or the common cathodes for their own 800 Hz multiplexing.


yep you got a point there, because each color matrix will share either the column or the rows with the other...which in turn are driven by separate MAX7219, so this will need a scheme to multiplex the 7219s. I haven't looked in the datasheets if they have such capability, my first though is to switch them on/off alternatively fast enough to get the colors multiplex...but that sounds like a punishment to the chip lol

A better solution would be to use one MAX7219 and connect the anodes (for common-cathode) or cathodes (for common-anode) of each color maxtrix alternatively to it, by using an arrangement of transistor and logic gates that acts as a SPDT switch. That will be interesting to try. (EDIT some 4066 bilateral switches could take care of that, although not in the most efficient way perhaps)

back to the main point though, it seems you agree that a MAX7219 will work with common-anode led matrix just as well?  :)

CrossRoads

I did not say that, no.

However, if the MAX7219 multiplexes by driving current into one Digit line and sinking current into 1 Segment line at a time, then electrically you would be okay.
If you ran in no-decode mode and defined your fonts you'd be okay, otherwise things could rotated 90 degrees, or maybe flipped somehow, from what you are expecting.
It would be easy to write a sketch to turn on 1 segment at a time, one register at a time, to see where things ended up.
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

straddlethemoon


I did not say that, no.

However, if the MAX7219 multiplexes by driving current into one Digit line and sinking current into 1 Segment line at a time, then electrically you would be okay.
If you ran in no-decode mode and defined your fonts you'd be okay, otherwise things could rotated 90 degrees, or maybe flipped somehow, from what you are expecting.
It would be easy to write a sketch to turn on 1 segment at a time, one register at a time, to see where things ended up.


bingo
that's a good question, HOW does MAX7219 does the multiplexing?
in my simple example, everything seemed to be fine. And what works for one LED works for any other, so the two matrices are identical...nope! That would work if only one LED is lit at a  time, which I'm sure is not the case, without even having to refer to the datasheet, because
-it's hard to imagine the professionals would design it in such an inefficient way
-it's hard to imagine that only I discovered that MAX7219 works with common-anode while everywhere is written specifically "common-cathode"

To be more specific, if we want to switch the two leftmost leds in the upper row, then for the common-cathode it's
ROW1,2,3,4 = L, H, H, H
COL1,2,3,4 = H, H, L, L

if we do the swapping the way I suggested, for the common-anode it will be:
ROW1,2,3,4 = H, H, L, L (the COLS from above)
COL1,2,3,4 = L, H, H, H (the ROWS from above)
and this will result in lighting leds {row, col} = {1,1} and {2,1}
(rows run from top to bottom and cols run from left to right)

even if we rotate by 90 degrees the resulting image will be the mirror of the desired one...yep it's gonna take some software fiddling which I'm not willing to do (I love programming but I'm currently working on other projects), I prefer to buy another led matrix.

I'm just gonna check if there's any library that supports common-anode

straddlethemoon

nah, I don't think there's something available right now.
I went here http://arduino.cc/playground/Main/MAX72XXHardware and checked each entry, they all mention common-cathode. It was too good to be true lol

CrossRoads

Maxim has other parts.
http://datasheets.maxim-ic.com/en/ds/MAX6960-MAX6963.pdf
This could be good for another thread that was discussing 2 color & RGB matrices.
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Go Up