Re: Best way to get 2.5 volts from somewhere? (Vcc = 5 volts)



In article <slrng2mo62.o5n.andrews@xxxxxxxxxxxxxxxx>, Andrew Smallshaw <andrews@xxxxxxxxxxxxxxxx> wrote:
On 2008-05-13, Tomás Ó hÉilidhe <toe@xxxxxxxxxxx> wrote:

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

Potential problem here. What voltage is present on the MCU pin?
5V strongly suggests TTL compatible inputs/outputs to me which are
_not_ 0V and 5V. From memory low is up to 0.8V and high is at
least 2.0V. There is a possibility that your pin could be 'high'
and delivering 2.0V which is still _less_ than the 2.5V on the
other end of the LED.

This is of course the worst case scenario, but the LED's barrier
voltage is also conspiring against you. The exact value varies
depending on the device but typically around 1.7V is needed for
the LED to conduct. 2.5V+1.7V=4.2V which is a big ask from a 5V
device.

From p.135 of the PIC16F684 data***:
Voh min = Vdd - 0.7V at 3.0 mA and Vdd=4.5V
Vol max = 0.6V at 8.5 mA and Vdd=4.5V
So no problem getting 4.3V with a 5V supply. Actual values at room temperature
are even better than this.

A bigger concern is how he plans to multiplex the LEDs. The maximum current
into/out of Vdd or Vss is 95mA. So if he's using 25mA per LED and has more
than three LEDs connected in this manner, all it takes is one small glitch
somewhere to turn them all on at once and there goes the CPU. This might be an
acceptable risk for his hobby project but not something I would ever do in a
commercial product.
.