Hi J2,Sorry, I do not do Oshonsoft. In Assembly, one would probably use a bit test on the port (btfss or btfsc = bit test register/port and skip next instruction if set/clear, respectively).
If WAIT does what I suspect, that might be equivalent to "btfss" followed immediately by a command to step back one step (i.e., keep testing the bit until it is set). That will pause everything for the time it takes for the bit to change, but that is not necessary to do. An interrupt based on the bit (say an IOC or INT pin) or a timer rollover (i.e., check once each rollover and do other things in the interim) are two of the ways to avoid that delay.
Of course, in your design, you have other interrupts working, and it is more complex.
Ah, different languages!
I think you're correct in the way you guess what WAIT does, and I don't think any slight pause will matter too much, so I'll try to do that.
Thanks, C.