Searching \ for 'Drive bicolor LED w/ one output pin' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/displays.htm?key=led
Search entire site for: 'Drive bicolor LED w/ one output pin'.

Truncated match.
PICList Thread
'Drive bicolor LED w/ one output pin'
2004\04\22@021858 by Anand Dhuru

flavicon
face
Connect two 330 ohms in series; the other ends of each go to +5 and ground.
Connect your bi-colour between the common point of the resistors and your
PIC output.

You might need to tweak the values to get uniform intensity on both colours.

Regards,

Anand Dhuru

{Original Message removed}

2004\04\23@082724 by Matt Redmond

picon face
Perfect - thanks!

-matt redmond

-----Original Message-----
From: pic microcontroller discussion list [spam_OUTPICLISTTakeThisOuTspamMITVMA.MIT.EDU] On
Behalf Of Anand Dhuru
Sent: Thursday, April 22, 2004 1:19 AM
To: .....PICLISTKILLspamspam@spam@MITVMA.MIT.EDU
Subject: Re: Drive bicolor LED w/ one output pin

Connect two 330 ohms in series; the other ends of each go to +5 and ground.
Connect your bi-colour between the common point of the resistors and your
PIC output.

You might need to tweak the values to get uniform intensity on both colours.

Regards,

Anand Dhuru

----- Original Message -----
From: "Matt Redmond" <mdredmondspamKILLspamCHARTER.NET>
To: <.....PICLISTKILLspamspam.....MITVMA.MIT.EDU>
Sent: Thursday, April 22, 2004 3:34 AM
Subject: [EE]: Drive bicolor LED w/ one output pin


> Hi All,
>
> My basic EE skills are lacking so I was hoping someone might suggest a
solution to this...
>
> 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.
>
> 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.
>
> 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).
>
> Any thoughts?
>
> Thanks!
>
> --
> http://www.piclist.com hint: PICList Posts must start with ONE topic:
> [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

--
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

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2004\04\23@085045 by hael Rigby-Jones

picon face
{Quote hidden}

But note the limitations of this method which were explained in the [EE:]
tagged thread.  This will draw extra current all the time, and your LED must
have a forward voltage of less thasn 2.5volts (immediately ruling out
blue/white/purple LED's).

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
postmasterspamspam_OUTbookham.com.

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2004\04\23@093946 by Spehro Pefhany

picon face
At 01:49 PM 4/23/2004 +0100, you wrote:


>But note the limitations of this method which were explained in the [EE:]
>tagged thread.  This will draw extra current all the time, and your LED must
>have a forward voltage of less thasn 2.5volts (immediately ruling out
>blue/white/purple LED's).

It's pretty marginal with the typical red/green LED as well. As the sum
of the two Vf's approaches the power supply voltage, the "extra current"
approaches infinity as does the sensitivity to small changes in the power
supply voltage (and on resistance of the PIC port).

Example, the sum of Vf's at 10mA for HE red and GaP green is 4.1V
typical at 10mA, 5.1V maximum at 20mA.

If the OP wants to try it out for a hobby application, try around 200/240
ohms in series or 100/110 ohms in series.

Best regards,

Spehro Pefhany --"it's the network..."            "The Journey is the reward"
@spam@speffKILLspamspaminterlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2004\04\23@132723 by Byron A Jeff

face picon face
On Fri, Apr 23, 2004 at 09:48:21AM -0400, Spehro Pefhany wrote:
{Quote hidden}

OK so let's rethink the problem. I think my posting on using an opamp made
it to the list. It should be possible to configure an opamp as a inverting
comparator that's close to rail to rail. Let's start with the opamp mantra:

The output tries it very best to equalize the voltages on the + and - inputs.

OK. Since we want to invert the output we need a situation where the output
will drive low when an input is high and vice-versa. We use the game plan
of putting one input at 2.5V using 47-100k voltage divider and using the
PIC output to swing the other terminal. In fact if we wanted to we could
use a dual opamp like a 1458 and drive the two LED terminals, one positive
and one negative. But back to the issue.

To drive the opamp output low the + terminal needs to negative in
reference to the - terminal. So that means we can either ground the
+ terminal and have the - @ 2.5V or have the + terminal @ 2.5V and make
the - terminal high (+5V).

To drive the opamp output high the + terminal needs to positive in
reference to the - terminal. So that means we can either ground the
- terminal and have the + @ 2.5V or have the - terminal @ 2.5V and make
the + terminal high (+5V).

One last thing is that the PIC output needs to be the opposite polarity of
the opamp output. So in the first instance the PIC output is high and in
the second the PIC output is low.

So we have a winner. The + terminal needs to be 2.5V with the divider and the
PIC output connected to the - terminal. That way the opamp drives low when
the PIC output is high and vice-versa. A inverting comparator.

Hope this helps, 2 resistors and a 8 pin package opamp/comparator will do the
trick.

BAJ

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2004\04\23@134421 by Spehro Pefhany

picon face
At 01:28 PM 4/23/2004 -0400, you wrote:


{Quote hidden}

Sure, plus a series resistor for the LED. Note that some op-amps don't
play well when you use them as comparators (they may have diodes from V+ to V-,
for example). Comparators are often open-collector. Many op-amps will work
fine.

>BAJ

Or my posting to the EE thread, where we have this 1.5 component solution:


                                    LED A
                                +---|<--+-------+
                                |       |       |
                                +--->|--+      .-.
                                |   LED B      | | Rs
                                |              | |
                                |              '-'
                                |   |\          |
                  PIC  ---------+---| >O--------+
                                    |/

                         1/2 SN74LVC2G14


PIC pin:        High-Z: both LEDs off
                Low     LED A on
                High    LED B on


The SN74LVC2G14 dual ST inverter is about 0.48 one-off, 0.27 in 100's,
and is housed in a compact SOT-23-6, so it won't break the bank.

By floating the PIC port pin, both LEDs can be turned off, with
essentially zero current drain (thanks the the ST input).

Best regards,

Spehro Pefhany --"it's the network..."            "The Journey is the reward"
KILLspamspeffKILLspamspaminterlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

More... (looser matching)
- Last day of these posts
- In 2004 , 2005 only
- Today
- New search...