I screwed up anyways. They're supposed to be Pauseus (pw >> 1 )
>> is right-shift, same as divide-by a power of two (>>1=/2, >>2=/4, >>3=/8 and so on). If you right-shift a number by one bit, it's the same as divide-by-2. Same thing for a left-shift, << , multiplies a value by a power of 2.
I put that in there to split-up the long pause to give the serial port interrupt a chance to kick in.
At 2400 baud, a byte takes about 4.16ms to arrive. While that is a longer time frame than the pause for the servo, it was just an off-the-head change I thought might help. Might help to split the servo pause into more 'chunks', might not, might help to totally rewrite the code, then again, maybe what you've got is sufficient.
And DISABLE and ENABLE only disable and enable the PBP interrupt trapping and jumping to the PBP interrupt routine. The interrupts still happen, the bits still get set, but PBP doesn't do anything about them. For instance, if you DISABLE the interrupts, but manually check the individual interrupt flag bits in your code, you can still figure out if an interrupt hit or not.
Bookmarks