If I have an
MCU pin connected in between 2 resistors (a
voltage divider) how does the
MCU pin actually detect the voltage? I am using an
ATMega328 and reading the voltage from the divider by an
ADC enabled pin.
I believe my understanding is broken but here is what I'm thinking...
- the pin is floating but is set for input (has internal pull-up enabled)
- the top resistor in the divider takes some voltage (voltage drop)
- now, the wire that connects the middle of the voltage divider to the pin has a potential of
xvolts (it could potentially push by
- BUT, no current will flow through the connecting wire to the pin as the pin isn't at ground (there is nothing to "pull" the current towards it)
- if no current flows to the pin, how is voltage detected? If the current is 0 then according to Ohm's Law voltage would be 0 too