Brian Aase wrote: > Here's an interesting (and somewhat PIC-based) situation; > A customer has a requirement for a product that would have > an array of bicolor LEDs, the kind with two leads. Since the > necessary states of each LED include Off as well as red > and green, the obvious but messy way to drive them involves > connecting each LED lead to an output port. I.E. each LED > uses up two outputs. This works great for just a few LEDs > but uses up port pins really fast! We're talking some 50 or so > LEDs here. :-( > > One variation I thought of would be to connect one side of > each LED to a source of V+/2 and then tristate the output > to get the Off condition. Better, but it still uses too many > i/o pins. The code needed to do mutliplexing for power > reduction is a little scary too, but that can be dealt with. > > Can anyone suggest a way to further reduce the i/o pin count > by some sort of clever matrix connection? My poor tired brain > is just drawing a blank on this. Ultimately, the pin count is the count of the LED pins... But, You can set up a series of latches to accomplish driving an array of LEDs. Row = 1, Column =1 LED is OFF, Row = 0, Column =0 LED is OFF Row = 1, Column =0 LED is RED, Row = 0, Column =1 LED is GREEN and you can have Row(n) by Column (m) of LEDs. So the I/O pins required are the number of bits in the Row and columns latches (8!), and the address bits for the latch(es). > > > Brian Aase > > -- > http://www.piclist.com hint: The list server can filter out subtopics > (like ads or off topics) for you. See http://www.piclist.com/#topics -- * | __O Thomas C. Sefranek tcs@cmcorp.com |_-\<,_ Amateur Radio Operator: WA1RHP (*)/ (*) Bicycle mobile on 145.41, 448.625 MHz ARRL Instructor, Technical Specialist, VE Contact. http://hamradio.cmcorp.com/inventory/Inventory.html http://www.harvardrepeater.org -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics