>-----Original Message----- >From: Byron A Jeff [mailto:byron@CC.GATECH.EDU] >Sent: 22 April 2004 16:38 >To: PICLIST@MITVMA.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. > Even easier is to drive one side of the LED and a CMOS inverter input with the PIC pin, and the other side of the LED with the inverter output. The above solution may be ok, but you are limiting your forward voltage to 2.5volts for a 5v supply rail which may be marginal for some LED's |\ ---+ +-----+ |0-------------+ | | |/ | | | | |----+----+-|>|-+---/\/\/---+ | | | | +-|<|-+ PIC| LED | ---+ Regards Mike ======================================================================= This e-mail is intended for the person it is addressed to only. The information contained in it may be confidential and/or protected by law. If you are not the intended recipient of this message, you must not make any use of this information, or copy or show it to any person. Please contact us immediately to tell us that you have received this e-mail, and return the original to us. Any use, forwarding, printing or copying of this message is strictly prohibited. No part of this message can be considered a request for goods or services. ======================================================================= Any questions about Bookham's E-Mail service should be directed to postmaster@bookham.com. -- 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