Searching \ for '[PIC] BI-COLOR LED' 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: 'BI-COLOR LED'.

Exact match. Not showing close matches.
PICList Thread
'[PIC] BI-COLOR LED'
2002\09\06@033622 by Robert Wade

flavicon
face
Sorry I am a newbie at this but I have reviewed 3 books and none of them
explain how to control the ground. They only explain how to turn on and off
the power. I have a simple BI-COLOR LED from radioshack (#276-207) and to
change between the colors I have to turn on and off or switch the ground
between the PIN 1 and 3. I am using the normal "starter" PICs 16F84A.

Thanks in advance for any advice.

Rob

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


2002\09\06@045137 by David Harris

picon face
Hi-
You can wire pin2 to 5V, and pins 1&3 to two different output pins on the PIC.
If you write a zero to the pin connected to pin1, then current will flow fron
teh 5V to the PIC pin into ground inside the PIC, likewise the other pin.  If
you make them both zero, you will turn on both colours.  If a pin is a 1, then
both sides of the LED are at 5V, so no current flows, and the LED is off.
David

Robert Wade wrote:

{Quote hidden}

--
David Harris
 OmniPort Home Page:  http://www3.telus.net/OmniPort1/
   Discussion egroup: http://groups.yahoo.com/group/OmniPort
   Swiki:  http://omniport.swiki.net/1

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


2002\09\06@060630 by Jinx

face picon face
part 1 1115 bytes content-type:text/plain; (decoded 7bit)

> > I have a simple BI-COLOR LED from radioshack (#276-207)

If you go to Radioshack's site (http://www.radioshack.com) and
search for 276207 you'll find the LED's page. It doesn't
actually show that LED, but the "Schematic" link takes
you to a page which has a very scruffy gif on it. As far as I can
make out, this is the wiring of the LED. It's a common anode
type which, as David says, you wire the middle pin (2) to
5V and then 1 and 3 go to a PIC pin each through a resistor
each. I've just wired up some common cathode bi-colours
and found that the red needed 680 ohms in series to match
brightness with the green, which has 390 ohms in series. As
yours is a common anode type, the PIC pins need to sink
the current (ie you send the pin low to complete the circuit)
whereas my common cathode types need the middle pin
at 0V and the PIC pins go high to source the LED current.

PICs (and many digital ICs) can sink more current than they
can source, and a load such as LEDs works better on the
"high" side of the PIC, that is, between the PIC pin and 5V


part 2 1189 bytes content-type:image/gif; (decode)


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


2002\09\06@073115 by Morgan Olsson

picon face
Examples:

If it is a two pin bicolor LED: connect a resistor in series with one of the pins, then the loose ends of both th eresistor and LED to one PIC pin each.  To torn on one color hold one pin highn the other low.  For the other color switch high/low.

If it is a three pin bicolor/tricolor LED: connect the middele pin to GND.  The other pins to one PIC pin each whith series resistor.  To turn on one color hold one pin highn the other low.  For the other color switch high/low.  For a mix of both hold both high.

Resistor value in all cases about 330ohms.

/Morgan

Hej Robert Wade. Tack för ditt meddelande 08:15 2002-09-06 enligt nedan:
{Quote hidden}

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


2002\09\06@074442 by tony

flavicon
face
Sorry to state the obvious but don't forget to
place a resistor on either of the two colour pins or one on the
ground leg

Hi-
You can wire pin2 to 5V, and pins 1&3 to two different output pins on the PIC.
If you write a zero to the pin connected to pin1, then current will flow fron
teh 5V to the PIC pin into ground inside the PIC, likewise the other pin.  If
you make them both zero, you will turn on both colours.  If a pin is a 1, then
both sides of the LED are at 5V, so no current flows, and the LED is off.
David

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

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


2002\09\06@101127 by Harold Hallikainen

picon face
Another trick on 2 pin bi-color LEDs is to put a couple resistors in series (I use about 240 ohms) between +5V and ground. Put the LED between the junction of the resistors and the PIC pin. Tristate the pin to turn the LED off (note that PIC power dissipation will go up a bit since the pin is held at half Vcc by LED leakage current). To make the LED glow one color, set the pin low. The other color, set the pin high. This trick can save you one PIC pin.

Harold




________________________________________________________________
GET INTERNET ACCESS FROM JUNO!
Juno offers FREE or PREMIUM Internet access for less!
Join Juno today!  For your FREE software, visit:
dl.http://www.juno.com/get/web/.

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


2002\09\06@104537 by Morgan Olsson

picon face
Hej Harold Hallikainen. Tack för ditt meddelande 15:09 2002-09-06 enligt nedan:
>Another trick on 2 pin bi-color LEDs is to put a couple resistors in series (I use about 240 ohms) between +5V and ground. Put the LED between the junction of the resistors and the PIC pin. Tristate the pin to turn the LED off (note that PIC power dissipation will go up a bit since the pin is held at half Vcc by LED leakage current).

The bigger power waste is that current also flows in the resistor that is parallel to th elit diode.  And when both are off, current flows in both resistors.

One method is to replace both resistors with zeners, and add one current limiting resistor in series with the led.  (if we don´t dare to rely on totla series resistnace of PIC+LED+zener, which i don´t).

/Morgan

{Quote hidden}

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


2002\09\06@133110 by Harold M Hallikainen

picon face
       The two zener approach is clever, but a little more expensive. It's also
true that the power dissipation in the voltage divider is higher than
that in the PIC due to leakage current when the input is trisated.
Another trick (but, again, a bit more expensive) is to use a "rail
splitter" virtual ground (like
focus.ti.com/docs/prod/productfolder.jhtml?genericPartNumber=TLE24
26). This is pretty much a voltage divider followed by an op-amp voltage
follower. But, again, cost is higher.
       So, there are some neat tricks out there!

Harold

On Fri, 6 Sep 2002 16:34:49 +0100 Morgan Olsson <spam_OUTmorgans.rtTakeThisOuTspamTELIA.COM>
writes:
{Quote hidden}

FCC Rules Online at http://hallikainen.com/FccRules
Lighting control for theatre and television at http://www.dovesystems.com

Reach broadcasters, engineers, manufacturers, compliance labs, and
attorneys.
Advertise at http://www.hallikainen.com/FccRules/ .


________________________________________________________________
GET INTERNET ACCESS FROM JUNO!
Juno offers FREE or PREMIUM Internet access for less!
Join Juno today!  For your FREE software, visit:
dl.http://www.juno.com/get/web/.

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


2002\09\06@152958 by Robert Wade

flavicon
face
David,
     Thanks I did not know that the PICs would handle ground and current
for me. I tried what you stated but one of the colors always stayed on. But
I ended up using pin 0 --> 2 and connecting all 3 of the BI-Color LED pins
to the PICs. pin 0 turns on red, pin 1 is power, and pin 2 is green. If I
want to turn off the light all I have to do is LOW the pin 1.

I could not figure out what you were asking me to do when you say write a
zero to the pin.

The down side of this is that it eats up 3 pins. Where as I could do the
same thing with 2 pin and 2 LEDs rather that just a BI-Color 3 pin LED.

Thanks for everyones help and input.

Rob

{Original Message removed}

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