# Converting 21 inputs into 8 inputs for EEPROM address pins

I am just diving into the world of multiplexers, so my knowledge of them is not the greatest. I am trying to develop a circuit that can control 10 RGB LEDS (30 total LEDs) via 2 inputs per LED and one input that affects all LEDs (21 total inputs). I would like to achieve this with an EEPROM, so I was going to try a LED multiplexer on the output pin, but I am unsure if there exists a multiplexer that can pull in 21 inputs and condense them down to 8 inputs so that they are addressable on the input side.

I would like to avoid a microcontroller, because I want to see if it can be done with an EEPROM. Thanks for the help ahead of time!

Truth Table utilizing 7 EEPROM ICs:

I am sure that this is super inefficient cost-wise and space-wise, since it uses 7 EEPROMS for 13 RGB LEDs (39 total LEDs). The left table is the input into the 15 Address pins on the EEPROM, and the right table is the I/O output pins to the LEDs. The table with Blocks 1-8 control 12 RGB LEDs (36 LEDs), and the bottom table is a single EEPROM that controls a single RGB LED (3 LEDs). Let me know if this all makes since or if I can clarify anything.

• 21 inputs and condense them down to 8 inputs ... are you talking about 21 bit addressing, or are you talking about throwing away 13 inputs? .... what are you trying to accomplish with the LEDs? Oct 24, 2021 at 17:00
• My goal is to use an EEPROM with 8 bit addressing to receive 21 inputs through some sort of multiplexing system. My understand of multiplexers isn’t that great, so I wasn’t sure if there was a version of a multiplexer or IC that could accomplish this. All 21 inputs would be utilized. The outputs would control 30 LEDs via a multiplexer. Oct 24, 2021 at 17:06
• 21 inputs 10 LEDs each with 8 states (on/off) for 80 states total but no transfer function defined except 1 for all Off. Or did you mean 2 pins / LED and want some Charlieplex solution Oct 24, 2021 at 17:10
• It would be 21 inputs, where 2 inputs control the three colors for 1 RGB LED output and 1 overall input to control all LEDS for a total of 21 inputs for a 10 LED system. Sorry if I’m not being clear, since this is a new topic for me. Oct 24, 2021 at 17:24
• How did you want to address each LED and how often changed? and what pattern? 8 toggle switches? Oct 24, 2021 at 18:01

## 1 Answer

If you only require the visual appearance of the LEDs being controlled, you could use (say) the lower 3 address inputs on the EEPROM and clock them at a relatively high frequency (kHz), then multiplex the LEDs in 8 banks, giving you up to 64 outputs.

If you have RGB LEDs with common anodes you would likely want to drive them in 5 pairs of 2 with two EEPROM outputs unused and 3 bytes of EEPROM unused (you could count to 5 rather than 8 to improve the duty cycle).

So you have a 3 bit counter and a 1 of 8 decoder, a clock oscillator and 6 sink drivers (eg. ULN2003A) and 5 high-side source drivers (could be a few dual MOSFETS) for the 10 LEDs. Plus 6 resistors. You might need to add a one-shot multivibrator to reduce ghosting.

Edit:

simulate this circuit – Schematic created using CircuitLab

• Hmm, I am having a difficult time visualizing this. Would you mind showing me a quick schematic or block diagram? Oct 25, 2021 at 0:58
• Which part is hard to visualize? The LED matrix or the drivers? Oct 25, 2021 at 1:02
• - What does clocking the EEPROM addresses at a higher frequency allow for vs a lower frequency in this instance? - I can't really visualize what you mean by paragraph two. Oct 25, 2021 at 1:10
• You want to cycle through each of the 5 sets of LEDs faster than the human vision flicker fusion frequency so they appear to be on or off continuously. Something like a kHz or two is fast enough unless there is a lot of vibration, in which case you might want to go higher. This is the same principle used in multiplexed 7-segment displays. Oct 25, 2021 at 1:12
• Ah okay I see. I'll play around with this idea a bit. Oct 25, 2021 at 1:18