PDA

View Full Version : How can I store the status of a pin?



Stargazer3141
- 2nd December 2010, 22:41
I need to write a program ( using PICBASIC PRO) and in this program I need to read the state of a pin ( either high or low) , store it, wait about five minutes, read the state of the pin again, and compare the two states ( same pin) . Is this best accomplished using the BUTTON command, or can I store the state of a pin as a variable, or what?

mackrackit
- 2nd December 2010, 22:53
You can store as a VAR
VAR = PORTX.Z

Mike, K8LH
- 3rd December 2010, 22:59
I agree with Dave.