08-17-2005, 01:18 AM
Is there a PBASIC command or way to return the status of all the pins? I'm trying to monitor sensors, and was looking for a command that would return a binary string, so I wouldn't have to have 16 IF statements. Thank you.
08-17-2005, 01:21 AM
Assuming all your pins are configured as inputs, you get read them with one line of code:
· theInputs = INS
INS is a 16-bit register that holds the current state of the inputs; INS.BIT0 holds P0 status, INS.BIT15 holds P15 status.
Applications Engineer, Parallax