Continue to Site

Welcome to

Welcome to our site! is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] Analog latch memory?

Not open for further replies.


Newbie level 4
Jun 30, 2012
Reaction score
Trophy points
Activity points
Hi there.
I'm quite a newbye in this field, but I'd like to show you my ideas and possibly discuss how to improve them.
In my current project I need to create a little Led stick of 16 led with a simple interface so that any mcu may control it.
In essence, I have 4 pin to address a single led , an analog pin and an enable digital signal. When enable is high, the analog voltage is written to the memory linked to the specified led so that one can execute something like "SetLedBrighness(num, brightness)".
I use the 4 pin bus as the select input to two 6 channels demultiplexers to connect the enable and analog signals to a specific pin. Then, to store the analog value, I simply use a capacitor with a buffer like this:
The problem is, I have to repeat this for each and every LED (*3 if I use RGB led) and it would become quite complicated to do in a PCB..
so my first question is: how can i simplify this circuit? Maybe there are some ICs that already implement this?

This is like a sample-and-hold circuit. A mosfet can be substituted for the op amp. You must select a type which is able to respond to your bias and supply voltage.

You may need a bleeder resistor in parallel with the capacitor, to discharge it gradually.
Thank you, never thought about S&H. I just found some documentation.. it's a bit of a good feeling when you come to understand they make it just like you guessed.

I think using pwm with your mcu would be best for what you are trying to do. You can try looking up digital-to-analog conversion via pwm. Using pwm, you will need 1 mcu pin for each led, and no additional hardware. But it is also unlikely that your mcu has 16 pwm pins, so you may need to use software pwm. Alternatively, you can also look for a pwm controller that can be interfaced to your mcu (which will most likely be via i2c, spi, etc.)
I did know about PWM but I discarded that beforehand because of the same reason you appointed (not enough pin), and because I like the idea of independent and scalable modules (led stick should not make the MCU busy, and I may add more leds simply adding address pins. The PWM controller is something i didn't think about, so thank you, i'll be searching about them too and eventually ask here.

Ok I think I'll be going with the TLC5955 ic by TI which provides 48 channels (16 RGB leds) and doesen't really require anything more than some wiring, even though the Sample & Hold solution would have been more challengy and interesting.
I'm still going to do that with another project of mine anyways.
Thank you very much!

Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to