Command to return status of all the pins
Mziskind
Posts: 9
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.
Comments
· 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.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax