That is one of the problems with ON INTERRUPT. Not sub routines but ON INTERRUPT waiting for certain commands to finish.
From the manual
When an interrupt occurs, it is flagged. As soon as the current PICBASIC PRO™ statement=s execution is complete, the program jumps to the BASIC interrupt handler at Label. Once the interrupt handler is complete, a RESUME statement sends the program back to where it was when the interrupt occurred, picking up where it left off.So you will want to use ASM interrupts or DT's instant interrupts. DT basically makes ASM interrupts easy.PBP will not enter the BASIC interrupt handler until it has finished executing the current statement. If the statement is a PAUSE or SERIN, it could be quite a while before the interrupt is acknowledged. The program must be designed with this latency in mind. If it is unacceptable and the interrupts must be handled more quickly, an assembly language interrupt routine must be used.
http://www.picbasic.co.uk/forum/showthread.php?t=3251
Last edited by mackrackit; - 30th November 2010 at 14:14.
Dave
Always wear safety glasses while programming.
Bookmarks