Best way to get 2.5 volts from somewhere? (Vcc = 5 volts)
- From: Tomás Ó hÉilidhe <toe@xxxxxxxxxxx>
- Date: Tue, 13 May 2008 11:27:21 -0700 (PDT)
I've got a bi-colour LED. It has two pins. Internally it consist of
two LED's in parallel except they face in different directions.
I'm looking into ways of using one micrcontroller pin to control the
LED as follows:
Pin High = Light up Red
Pin Low = Light up Green
Pin as Input = Nothing lights up
A friend of mine suggested to me today to connect one of the LED pins
to the microcontroller, and the other to 2.5 V. That way, if the uC
pin is high, it will source current from 5 volts to 2.5 volts. If it's
low, it will source current from 0 volts to 2.5 volts. (Of course I'd
have a resistor somewhere).
So the only question is how I'd put one of the pins at a constant 2.5
volts. My first thought was to use a zener diode, i.e. take a pin from
the LED, put into one side of the zener, and tie the other side of the
zener to ground. I'm not entirely sure if this will work though.
Another complication would be that I'd need two zeners in parallel
facing the opposite direction in order to let current flow in both
directions.
Do you think the whole 2.5 volts idea is good? What's the best way of
getting one of the LED pins to sit at 2.5 volts?
.
- Follow-Ups:
- Re: Best way to get 2.5 volts from somewhere? (Vcc = 5 volts)
- From: Andrew Smallshaw
- Re: Best way to get 2.5 volts from somewhere? (Vcc = 5 volts)
- From: Andrew Smallshaw
- Re: Best way to get 2.5 volts from somewhere? (Vcc = 5 volts)
- From: Jim Granville
- Re: Best way to get 2.5 volts from somewhere? (Vcc = 5 volts)
- From: MK
- Re: Best way to get 2.5 volts from somewhere? (Vcc = 5 volts)
- From: Tomás Ó hÉilidhe
- Re: Best way to get 2.5 volts from somewhere? (Vcc = 5 volts)
- From: Tomás Ó hÉilidhe
- Re: Best way to get 2.5 volts from somewhere? (Vcc = 5 volts)
- From: Nils
- Re: Best way to get 2.5 volts from somewhere? (Vcc = 5 volts)
- From: Jim Granville
- Re: Best way to get 2.5 volts from somewhere? (Vcc = 5 volts)
- From: Spehro Pefhany
- Re: Best way to get 2.5 volts from somewhere? (Vcc = 5 volts)
- From: johnspeth
- Re: Best way to get 2.5 volts from somewhere? (Vcc = 5 volts)
- From: linnix
- Re: Best way to get 2.5 volts from somewhere? (Vcc = 5 volts)
- Prev by Date: Re: My idea of fully-portable C code
- Next by Date: Re: My idea of fully-portable C code
- Previous by thread: A different program
- Next by thread: Re: Best way to get 2.5 volts from somewhere? (Vcc = 5 volts)
- Index(es):
Relevant Pages
|