I configured thusly:
J2[9].function(PINJ2_PD_GPIO);
J2[9].hiz();
and used J2[9].read() to examine it.
With pin 9 unconnected, I see 0.
When connected to J2 pin 2 (+3v3) through a 680 ohm resistor, no problem - I see a logic 1.
But when I use a 10k resistor, I get 0.
That sort of buggers my plan to attach an RC network to the pin and measure the time until I see a 1, as a way of determining resistance. The resistance I wanted to measure gets up to 100K or so. Is there a strong pulldown on these pins? Can I turn it off?
Barring that, is there a better way to measure resistances (between about 1k to 120K) with a pin? TIA.
Unexpected GPIO behaviour; reading 0 where 1 expected
Re: Unexpected GPIO behaviour; reading 0 where 1 expected
C'mon, folk. Someone here must have detailed knowledge of how these GPIO pins work. I've never used a processor where you had to drag a pin high this hard, to get it to register a logic 1, which makes me think I've done something wrong...
-
- Posts: 513
- Joined: Sat Apr 26, 2008 7:14 am
Re: Unexpected GPIO behaviour; reading 0 where 1 expected
See add'l info in this post: http://forum.embeddedethernet.com/viewt ... ?f=3&t=911
Re: Unexpected GPIO behaviour; reading 0 where 1 expected
what module are you using?, This this thread where i wrote an app to help with this.
http://forum.embeddedethernet.com/viewt ... 4771#p4771
http://forum.embeddedethernet.com/viewt ... 4771#p4771
Re: Unexpected GPIO behaviour; reading 0 where 1 expected
Scott,
I think this might be related to the 1k pulldown on pin J2[9] on the DEV 70 board, if that is what you are using.
Ed
I think this might be related to the 1k pulldown on pin J2[9] on the DEV 70 board, if that is what you are using.
Ed