IO pin state
Posted: Wed Oct 24, 2012 3:17 pm
> I want to use the device to monitor several voltage lines to see if
> they go high (get a voltage). I put a row of headers on the analog I/o
> but when one pin is powered high the ones either side seem to sense
> this and also go high.
A couple things-
If there is no voltage on the pin, is it just floating? If that's
the case, then that pin would read as most anything.
The analog pins must be limited to 3.3V, if the voltage goes above
that ALL analog pins will probably look like they are high. This is a
feature of the NXP part. It is not the case for digital inputs.
The simplest circuit I would use to sense the presence of a voltage is
2 resistors, say 10K and 1K. --
---- connection to voltage sense
|
/
\
/ 5K
\
| digital
o--- IO
|
/
\
/ 50K
\
|
GND
So if the voltage sense is connected to a voltage, then the digital IO
would be high, if there is no voltage then the IO would be low.
> they go high (get a voltage). I put a row of headers on the analog I/o
> but when one pin is powered high the ones either side seem to sense
> this and also go high.
A couple things-
If there is no voltage on the pin, is it just floating? If that's
the case, then that pin would read as most anything.
The analog pins must be limited to 3.3V, if the voltage goes above
that ALL analog pins will probably look like they are high. This is a
feature of the NXP part. It is not the case for digital inputs.
The simplest circuit I would use to sense the presence of a voltage is
2 resistors, say 10K and 1K. --
---- connection to voltage sense
|
/
\
/ 5K
\
| digital
o--- IO
|
/
\
/ 50K
\
|
GND
So if the voltage sense is connected to a voltage, then the digital IO
would be high, if there is no voltage then the IO would be low.