PDA

View Full Version : Need help determining multiplex?? chips to use to solve a Bi-colored LED matrix



T&E Engineer
04-11-2007, 10:00 AM
Many of you know I have been working on a 16x16 LED matrix Real Time Clock (DS1302) interface to an SX52 or SX48. For the most part it is working well. However, the 16x16 LED matrix I used is older technology (not·very bright) LEDs but they are ok for testing. I recently purchased·cheap 8x8 LED "pre wired" matrix modules (10 of them total). However, they are bi-colored being red·or green depending on which pin you select.

I couild simply just use either the red or the green colored LEDs and have·16 columns and·16 rows of either red or green. However, I would like to find a way to use both colors in my RTC interface to the SX52 protoboard. Currently I use RB and RC for the columns I believe and RD and RE for the rows. I also use RA.0 - RA.2 for interface connections to the DS1302. This leaves me 5 free I/O lines (RA.3 - RA.7) if I use my SX52 protoboard (or 1 free I/O line if an SX28 protoboard is used). However, I am using the SX52 protoboard so I have 5 available I/O lines free.

What this means is that the 8x8 modules if placed into a 16x16 display configuration (using 4 8x8 LED modules) can use 16 rows by 16 columns for a single LED color usage (either RED or GREEN LED color). If I wanted to use BOTH red AND green LEDs then I would have 16 anode rows by 16 cathode columns of red LEDs AND 16 cathode columns of green LEDs (16x32). This creates a big problem for the SX52 in that I would need 16 more I/O lines to use both red and green LEDs. Is there any way this can be done effectively?

I have attached my original code and drawings showing my connections. Keep in mind that since there are NOW red AND green LEDS the columns would double to 32 even though physically I would only display 16x16 being that only an individual red or green LED could be on in an LED placement on the matrix. The red and green LEDs share·the same spot. ·The full98.jpg attached picture shows my new 8x8 modules.

If I want to use 32 columns (really 16) then I will need a way to multiplex them I beleive, otherwise I would not have enough I/O on the SX52 protoboard I am using. Does multiplexing them make sense - AND would it allow for individual control of turning on some LEDs in red and some LEDs in green? I know I could add some sort of a logic circuit with an enable line to turn either ALL red LEDs on OR ALL green LEDs on (as they are used). However, I would like to have more control and the only way that comes to mind is to have 32 I/O lines (16 more than what I have now).

Does this make sense and is it doable? Any ideas on how to do this?

As you can see in my drawings I am using transistor / resistor circuits (16) to send a negative input in and provide a positive output to the 16 anode rows. However, I would need (4) ULN2803 chips to send a positive input in and provide a negative output to the 32 cathode columns.

Comments?

Robert Kubichek
04-11-2007, 10:14 AM
Could you use the same circuitry for both colors, and use 1 I/O to toggle between the two colors?
If the I/O is high , load the red display led data, if low load the green display data..
Also the extra I/O's could toggle other displays on the same data buss(es) then you could have a wider display (16x 32/48/64 ) for a truely
long scrolling display..


Bob

T&E Engineer
04-11-2007, 06:43 PM
Can you explain your idea more? I'm not picturing it totally.

I'm thinking that you are saying this external circuitry would need to take the SX52·RB and RC as inputs (16 inputs) and provide 2 sets of 16 outputs that are fast switching depending on the state of·an enable or something (High for the first 16 outputs and Low for the other 16 outputs - or something). These positive outputs would go to either the red LED or green LED driver ULN2803 circuits.

However, I still don't know if this would·only provide either red OR green LEDs on and not provide the appearance that·BOTH red or green individual LEDs·COULD be on. Maybe if they were switched fast enough through the interrupt it would appear to have both red and green LEDs on through control of the enable line. But I'm still thinking this might only be possibly (or at least easiest by) having 32 postive outputs (16 for the red and 16 for the green) for the cathodes (via the inverting ULN2803 driver circuits). But if this was the case I would still need 16 more outputs for the Anodes and 3 I/O lines for the DS1302 which is 51 I/O lines too much.

PS: I also have 5 TPIC595 (high output 74HC595 chips) coming in the mail that could be used (e.g. replace the ULN2803). But maybe they would be too complicated to use going serially instead of individual outputs (which I have working code that wouldn't have much modification to do - IF I HAD MORE I/O).

Ideas...Comments..??



Post Edited (T&E Engineer) : 4/11/2007 10:53:19 AM GMT

Robert Kubichek
04-11-2007, 10:08 PM
I've thought more about it, and I would use 2 i/o's, one for each color.
Your driver circuitry would be doubled, ( red/green )and be driven by
latches (2 sets red/green ) connected to your I/O lines that you are
using right now.

The extra 2 lines would be the color select lines, where each is
connected to a set of latches and would load the color
data only if the coresponding color select was held high..

Think of a data buss in a computer, many devices are connected to it,
but depending on the address selected on the address buss,
only one of the devices will use the data..

Those 2 I/O s are the address buss....

Bob

Post Edited (Robert Kubichek) : 4/11/2007 2:12:50 PM GMT

T&E Engineer
04-11-2007, 10:12 PM
So are you thinking something like a 74HC373 or 374 might do the trick? The 16 output lines would run into 2 74HC373/374 (which one?). Then I/O lines for enables would turn the individual latch chips (373/374) on or off for red or green LEDs. Is this what you were thinking?

Robert Kubichek
04-11-2007, 10:19 PM
Yes, on that line. The only drawback is if they would be fast enough, and you would need a set for each color..

Bob

T&E Engineer
04-11-2007, 10:33 PM
I do have a few 74HC573 which state in the datasheet that they are "high speed" cmos ....· They are also functionally equivalent to the 373 octal D-Type transparent latch (3 state) IC's.

T&E Engineer
04-12-2007, 09:18 AM
Here is a schematic I came up with tonight that uses (4) 74HC573 chips and a 74HC04 inverter.

Does this look right? I think with the proper coding it will work but I would like to hear from other design engineers on this.



Thanks.