Roman Black email (remove spam text)
David VanHorn wrote:
> I just reconfirmed the low state, adding some "pings" on an unused pin.
> It's definitely low, at 10mV, when that btfsc is executed.
> If I enable that routine, we wait forever, even though the pin is an input,
> and low.
> It's as if something's getting between the code, and the external pin.
David when you initialse the port for direction, you are
following the PROPER sequence by issuing a
I have been caught by this before. Also it is a good idea to
use a softare delay of a half second or so defore doing any
pin sensing to allow voltages to stabilise, and my preference
is to set all pins as outs and drive them low, then 0.5 sec
delay, then change pins to inputs again and start running.
You never know if a capacitive load on a pin will cause
it to play up during initialisation especially if VSS is
not up to scratch yet. :o)
http://www.piclist.com hint: To leave the PICList
See also: www.piclist.com/techref/microchip/ios.htm?key=i%2Fo
You must be a member of the
piclist mailing list
(not only a www.piclist.com member) to post to the