T&E Engineer
04-11-2007, 09: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?
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?