>-----Original Message-----
>From: Byron A Jeff [
EraseMEbyronspam_OUT
TakeThisOuTCC.GATECH.EDU]
>Sent: 22 April 2004 16:38
>To:
PICLIST
spam_OUTMITVMA.MIT.EDU
>Subject: Re: [EE]: Drive bicolor LED w/ one output pin
>
>
>On Wed, Apr 21, 2004 at 10:04:31PM +0000, Matt Redmond wrote:
>> Hi All,
>>
>
>> My basic EE skills are lacking
>
>You may want to bone up. I've spent quite a bit of time
>reading the copy of the Art of Electronics I requested from
>our school library.
>
>> so I was hoping someone might suggest a solution to this...
>
>Fire away.
>
>> I have a bicolor LED - one of the 2-lead types where the
>green anode
>> is the red cathode and vice-versa. You reverse polarity to change
>> colors.
>
>Check.
>
>> What I need to do is drive this with one output pin on my PIC. I
>> swear I'd do it with two if I had them, but I don't.
>
>Understood.
>
>> The green can
>> be on all the time except when the red comes on. So - steady green
>> and then red when my output goes high (or low).
>
>Good. So it doesn't have to be off. That makes it a lot tougher.
>
>>
>>
>> Any thoughts?
>
>Several. The first is that if you can afford to burn the
>current you can simply tie the outside leg to a midpoint
>resistor voltage divider that locks the outside leg at 2.5V
>(presuming a 5V circuit). Then the PIC output can swing from 0
>to 5V, going from one color to the other as it swings. Neither
>LED in the bipolar should require more than 2V forward voltage.
>
>A more active approach could be to inject a opamp voltage
>follower between the divider and the LED. So you get:
>
>PIC pin -> resistor -> LED -> opamp follower -> voltage divider
>
>The nice thing about this approach is that you can build the
>voltage divider with 47K or 100K resistors limiting the amount
>of current they consume because they no longer have to feed
>power to the LED.
>