> I would suggest an easy remedy to this is to use a bipolar LED one of > the two-lead red/green types, available at Radio Shack or any mail-order > electronics house) connected as shown: > > Gnd----[220ohm]---+---[220ohm]----+5 > | > +---[LED]------- Port pin > > that this can be a useful trick for driving more than one "independently- Hmmm, I was having a discussion about bipolar LED's driven by PIC pins in one of my classes I'm teaching this summer just this morning. The objective was to drive 6 bi-polar LEDS (2 pin) using as few PIC port pins as possible. Each LED should be able to show red,green,yellow, and off. The design I hit upon after thinking a bit revolved around multiplexing the 6 LEDs utilizing a common pin on one side. Something like: Port pin---+-[220ohm]--+---[LED]------ Port pin | +-[220ohm]--+---[LED]------- Port pin | +-[220ohm]--+---[LED]------- Port pin | +-[220ohm]--+---[LED]------- Port pin And so on. One led can be selected by tristating all but one port pin on the right side. The selected LED's color can be picked by twiddling with the left port pin and the one non-tristated port pin. Actually, I think there is nothing new under the sun really ;) If you know about LED sign boards, this is how they work! You seem to have simplified it into a single line! (the initial poster did it down to a single pixel!) I think it is a nice idea though! The question that popped into my mind during this design discussion was the relevance of the position of the resistor. Does it matter if the resistor is on the anode or the cathode side of an LED. BAJ Theoretically both are identical. You don't need to put a resistor to both ends of a bipolar LED either. I do not know how this setup works with high frequencies (well, we have seen radio beacons recently), so I cannot comment on that... (Not that many people would drive their LED's at these frequencies!) Is there any "catch 22" to this? | Ahmet ONAT Kyoto Univ. Japan | | E-mail : onat@kuee.kyoto-u.ac.jp | | WWW page : http://turbine.kuee.kyoto-u.ac.jp/staff/onat.html | | My 6 leg walker, RC airplanes & more in home page |