I thought this was going to be simple. I have a controller, an LED, a resistor and a socket. Its a five volt circuit.
I want to plug the LED into the socket in a board. The controller needs to know whether or not the LED is plugged in, and if the LED is plugged in, it needs to be able to turn it on and off.
One issue is that the forward voltage of just about any LED puts all the voltages out in the middle of no-mans land in terms of logic levels.
Anyway, I came up with a solution, but it seems a little too complex and I get the feeling I'm missing something. My solution is here:
Basically, if you put a low on the input and there's an LED in the socket, the LED will turn on and you'll get a low on the output. If there's no LED, then you'll see a high on the output.
Is there a way to accomplish this with one i/o pin? Any way to save a part?
Thanks,
Mike