Is there a way to drive common cathode (4-pin) RGB LEDs with MAX7221 chips?
(http://datasheets.maximintegrated.com/en/ds/MAX7219-MAX7221.pdf)
thanks
Is there a way to drive common cathode (4-pin) RGB LEDs with MAX7221 chips?
(http://datasheets.maximintegrated.com/en/ds/MAX7219-MAX7221.pdf)
thanks
Not really. At none that would make any sense. You could make up table to cross reference the digit pins with segment pins but there would be no pattern to it. The chip is designed for common-cathode 7-segment displays so the segments connect to any led cathode and the digit pins connect to any led anode. If I was in a jam and I had to get some leds running with that chip it would take me about an hour to make up the table and another hour to write the sketch but electronically it is certainly doable.It has enough sink current You have to calculate the value for the current limit resistor connected to ISET.
WARNING: IF THE ISET PIN-18 IS CONNECT DIRECTLY TO +Vcc WITHOUT THAT RESISTOR AND THE POWER IS TURNED ON IT WILL IMMEDIATELY DESTROY ANY LED CONNECTED BETWEEN THE DIGIT PINS AND THE SEGMENT PINS IN ABOUT
1 mS !
Read the section about the Rset explaining how to calculate the resistor value. The schematic on the datasheet provides an example as a reference.
Your cross reference table should have digit pin numbers on the left side of the page and segment pin numbers across the top. Where the two intersect draw YOUR leds with the cathode toward the DIGIT pin and the ANODE toward the segment pin (because it is replacing a segment led of a common -cathode display.which has all the seven segment cathodes & decimal point connected to the digit pin and their anodes connected to the segment pins.)
You will also need a clock signal and you will need to load the serial data in.
Read pages 6 & 7 to understand the addressing and bit pattern.
Don't forget to read up about the Chip Select/Load pin too. That's how you load the data. Look at the waveforms.
It will be a lot of detailed work.
If it were me I would use a TLC5940 chip . That's pretty much plug and play using the library.
Your question was :
Is there a way to drive common cathode (4-pin) RGB LEDs with MAX7221 chips?
My answer is YES. Will it be fun ? That depends on whether you enjoy doing things the hard way.
It is a 10 Mhz serial chip so feel free to use whatever clock you want as long as it is not more than 8 Mhz. You can devide the 16 Mhz
clock by two to get your clock.
Since I'm such a nice guy I'll throw you a bone...
http://playground.arduino.cc/Main/LEDMatrix
Enjoy !
The datasheet says "Drive Common-Cathode LED Display". You can drive 16 RGB LEDs (2 per 'digit'). Connect the cathodes of the two RGB units together and connect them to one of the eight 'digit' pins. Connect six of the eight 'segment' pins to R1,G1,B1,R2,G2,B2. You can use the two remaining 'segment' pins to control two individual LEDs per digit.
Use "No-Decode" mode to control individual segments directly.
Building on John's answer: If you connect the 3 anodes to segments 0,1,2 and then 4,5,6, each nibble of a byte can represent each RGB LED:
byte RGBpair[] = {
0b0RGB0RGB,
0b0RGB0RGB,
0b0RGB0RGB,
0b0RGB0RGB,
0b0RGB0RGB,
0b0RGB0RGB,
0b0RGB0RGB,
0b0RGB0RGB,
}; // eight bytes representing 16 RGB LEDs
SEE TABLE-4 , Page-7 of datasheet for "No-Decode Mode" details.
http://datasheets.maximintegrated.com/en/ds/MAX7219-MAX7221.pdf