[sdiy] Driving LEDs

ASSI Stromeko at compuserve.de
Mon Dec 22 22:58:53 CET 2003


On Monday 22 December 2003 18:09, John Blacet wrote:
> I need to drive 20 LEDs from a PIC type uC. The LEDs are on a
> separate board so I want to keep the number of interconnects small. I
> only need one LED at a time to be on. So, I seem to need a decoder
> with 5 lines in to 20 out. Most of the stuff I see is 3 to 8. Any
> ideas?

Philips just released I²C LED driver chips with PWM outputs where 
frequency and duty cycle are seperately adjustable for each LED. These 
might even make good square LFO aside from their main purpose. But this 
is probably overkill for your application.

Next idea is a 5x4 matrix arrangement and again a serial transmission 
of the control word. I'd probably go for fully decoded transmission of 
9 bits, so you just need the register/driver at the other end. If 
somehow this needs to fit into 8bits for some reason, just decode the X 
and Y of the matrix out of five bits (and drop the twelve codes you 
don't need).

Last but not least three 3-to-8 decoders plus three decoded enable bits 
give you 24 LED to play with. You can control all three drivers from a 
single 8-bit register and you still have two spare bits. Pulling these 
into two more decoders gives you the ability to control 40 LED or 
perhaps 20 bi-color LED, of which you can control both colors 
independently on 16 of them.


Achim.
-- 
+<[Q+ * Matrix-12 * WAVE#46 * microQkb/Omega * XTk/30 * sonic heaven]>+

Q series MIDI Implementation & additional documentation:
http://homepages.compuserve.de/Stromeko#WaldorfQDocs




More information about the Synth-diy mailing list