Hi,

As all your inputs are on PortB ... why not use the simple feature " interrupt on PortB change " ???

you just have to check which input caused the interrupt and do what needed ...

That would not disturb your PWM sections nor make great changes to your tempo's, even if a basic interrupt used.

( note it's an Excellent excercise for trying Darrel's Instant interrupts, too ... )

just change PAUSE 500 to

For i = 1 to 500
PAUSE 1
Next i

... as stated in the MANUAL, Basic interrupts section ....


Alain