On Wed, 24 Jun 1998 13:14:41 -0500 "Jonathan M. Newport" writes: >continuous loop like: > >circle goto circle > >waiting for an interupt. when the isr is finished and I use the >retfie >command, will it increment the program counter to execute the >instruction >after this one? No. When the interrupt is done, the program will continue in the endless loop. or if it doesn't is there a way that I can increment >the >program counter myself? You can't change the program counter on the stack (Even if you could, it wouldn't be a very good practice since you'd also have to be sure that it was the endless loop that was interrupted). The most flexible way to do it is to have the ISR set a flag, then test the flag in the main program: (flags is a byte in RAM, and isrdone is a constant from 0 to 7 indicating the function of that bit in flags) [In the ISR] .... bsf flags,isrdone ;Tell main program the int. has occurred. ... retfie [In the main program] bcf flags,0 ;Interrupt hasn't occurred. [Enable interrupts, etc.] waitint btfss flags,isrdone ;Skip if flag is set goto waitint ;Otherwise keep waiting ;Here after interrupt. This technique is very flexible. For example, if the ISR is collecting data being sent serially, it might not set the flag until after a whole byte has been received. The main program would then wait until the byte is complete. _____________________________________________________________________ You don't need to buy Internet access to use free Internet e-mail. Get completely free e-mail from Juno at http://www.juno.com Or call Juno at (800) 654-JUNO [654-5866]