- Announcement about May 10th, 2018 update and your password.
How to wait on a pin state?
I was updating my P1Spin bytecode interpreter this morning, and I'm trying to figure out how to handle the WAITPEQ and WAITPNE bytecodes. When I did this a few years ago I use SETPAE, SETPBA, SETPAN or SETPBN followed by a WAITPAT. However, those SETXXX instructions no longer exists. It seems now I must do a MODCZ, DECOD, SETPAT and then WAITPAT. Is that the way best way to wait on a pin where the pin number is specified in a register, or is there an easier way to do it that requires fewer instructions?