Stamp lags in detecting IN6 being 0
Matthew
Posts: 200
Hello.
I have a 'break wire' trigger system set up on my stamp so that if IN6 = 0, the program will continue.
Pretty much the loop looks like this:
DO
LOOP UNTIL IN6 = 0
I have pin 6 conntect to a 220 resistor, which is connected to a wire, which is then connected to Vdd. Everything starts connected, and supposedly if I remove the wire, IN6 is supposed to = 0. In my case, sometimes it reads it right away, sometimes it takes up to 4 seconds. I know it's not a refreshing issue because I tested this:
DO
counter = counter + 1
DEBUG HOME, DEC5 counter
DEBUG, CR, DEC1 IN6
LOOP UNTIL IN6=0
'Counter' increases it's value very very very very rapidly, yet sometimes it won't detect IN6 being 0 if the wire is broken.
Any ideas?
I have a 'break wire' trigger system set up on my stamp so that if IN6 = 0, the program will continue.
Pretty much the loop looks like this:
DO
LOOP UNTIL IN6 = 0
I have pin 6 conntect to a 220 resistor, which is connected to a wire, which is then connected to Vdd. Everything starts connected, and supposedly if I remove the wire, IN6 is supposed to = 0. In my case, sometimes it reads it right away, sometimes it takes up to 4 seconds. I know it's not a refreshing issue because I tested this:
DO
counter = counter + 1
DEBUG HOME, DEC5 counter
DEBUG, CR, DEC1 IN6
LOOP UNTIL IN6=0
'Counter' increases it's value very very very very rapidly, yet sometimes it won't detect IN6 being 0 if the wire is broken.
Any ideas?
Comments
You posted some do/loop code...is that what you actually use?· and does THAT too take 4 seconds?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·
Steve
http://members.rogers.com/steve.brady
"Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
To see how a floating pins effect your progect run your program and rub your finger accross the pin. I am sure it will change state.
Thanks a bunch man! It works now. The pull up and downs and floating pins makes lots of sense!
Matthew