Matrix of bi-color leds
Ramboman
Posts: 101
My intention is to build a large matrix of bi-color leds under control of the propeller.
Each led has to be set (or not) to red, green or yellow (alternating red and green).
For one led, it's pretty easy; I connect the led to P0 and P2 thru a 100 ohm resistance.
With (as output) P0 to 0V and P2 to 3.3V, it's red; with P0 to 3.3V and P2 to 0v, it's green.
Alternating red and green fast enough, it's yellow (or orange).
Let's take an example with a matrix 2x2 where P0 and P1 drive the rows and P2 and P3 the columns.
If I set P0 to 0V and P2 to 3.3V, the led at the intersection becomes red.
If I set P0 to 3.3V and P2 to 0V, the led becomes green.
My question is: "How do I have to set P1 and P3 to avoid the other leds to light up?"
Thanks
Roland
·
Each led has to be set (or not) to red, green or yellow (alternating red and green).
For one led, it's pretty easy; I connect the led to P0 and P2 thru a 100 ohm resistance.
With (as output) P0 to 0V and P2 to 3.3V, it's red; with P0 to 3.3V and P2 to 0v, it's green.
Alternating red and green fast enough, it's yellow (or orange).
Let's take an example with a matrix 2x2 where P0 and P1 drive the rows and P2 and P3 the columns.
If I set P0 to 0V and P2 to 3.3V, the led at the intersection becomes red.
If I set P0 to 3.3V and P2 to 0V, the led becomes green.
My question is: "How do I have to set P1 and P3 to avoid the other leds to light up?"
Thanks
Roland
·
Comments
Using 3 lead bi-color LEDs is a nice idea!
Reducing the size of the matrix to fit the 28 available pins on the propeller.
Thanks for the remark.
The basic idea was a cube 5x5x5, with 25 colums and 5 floors for a total of 30 pins.
With bi-colors LEDs, I have to reduce the cube to 4x4x4, using 24 pins.
Or to use add'l multiplexers from 4 to 16 ???
Another (stupid) question based on my example:
"What happens if P1 and P3 are defined as input (high impedance)?"
DP-033 (3mm LEDs)
DP-030 (5mm LEDs)
There are also a few threads on them in the forums:
SNEAK PEAK at 64x32 LED Display Board project.
SX controlled 6432 Dot Matrix Bi/Tri-Color LED Display
PWM help with SPI type RGB LED Displays - Is it possible?
If you are looking for do-it-yourself design, download their documentation (as poor as it is) so you can get an idea from their schematics. Basically they use a shift register IC, the 74HC595, which even Parallax sells on their webstore.
There are also RGB boards on the market.
Post Edited (Andrew E Mileski) : 11/23/2008 5:39:12 PM GMT
http://obex.parallax.com/objects/388/
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Living on the planet Earth might be expensive but it includes a free trip around the sun every year...
Experience level:
[noparse][[/noparse] ] Let's connect the motor to pin 1, it's a 6V motor so it should be fine.
[noparse][[/noparse] ] OK, I got my resistors hooked up with the LEDs.
[noparse][[/noparse]X] I got the Motor hooked up with the H-bridge and the 555 is supplying the PWM.
[noparse][[/noparse] ] Now, if I can only program the BOE-BOT to interface with he Flux Capacitor.
[noparse][[/noparse] ] I dream in SX28 assembler...
/Bamse
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
We used to marvel at Maxwell Smart·having a phone in his shoe. Now we just say what a stupid place to put a phone!