I understand from studying electrical science that the "ideal volt meter" would have infinite resistance and that it would draw no current whatsoever.
However I know in reality that our volt meters have a little bit of conductance and thus a tiny bit of current flows thru them. It seems the higher the resistance of the volt meter, the less the circuit is interfered with, leading to a more accurate reading.
Let's say we had a circuit consisting of just two 4 megaohm resistors in series. If the supply voltage is a 20 volts, then we should have 10 volts across each 4 megaohm resistor. Consider tho if we had a volt meter that had a resistance of 2 megaohms. When this volt meter is put across one of the four megaohm resistors, you'll get much more current flow overall in the circuit, and I presume the meter will give a dodgy reading.
Anyway... the reason I'm talking about all this is that I'm working with tri-state microcontroller pins with the following three states: Output, High (5 volts) Output, Low (0 volts) Input
When a pin is set as an "input", it is said to be "high impedence". When you put a volt meter across an input pin of the PIC16F684 microcontroller, it measures something like 3 V. Now I'm wondering if this is *actually* 3 volts, or whether it's 5 volts but that our volt meter is experiencing what I've described above?
Getting down to the crux of it, I'll describe what I'm trying to do:
I have a tri-colour LED. It has three pins altogether. Internally it consists of two different colour LED's that have a common cathode. The anodes are separate.
I have a microcontroller pin. I want to use transistors to make it so that the pin's three states correspond to: Pin Output High = Green LED on Pin Output Low = Red LED on Pin High Impedence = Both LED's off
I can take an NMOS and a PMOS transistor and connect their gates together. I can then connect a uC pin to the gates. When the uC pin is high, it will turn on the NMOS which will allow current to flow thru the green LED. When the uC pin is low, it will turn on the PMOS which will allow current to flow thru the red LED. When the uC pin is set to high impedence... well... I'm not sure what would happen, I don't know whether this "phantom 3 volts" will be enough to turn on either of the transistors.
Has anyone ever done this before? Any pointers?