Hi! 24-May-98 22:42 Mike Keitz wrote about "Re: Single step": >> On Mon, 25 May 1998 11:16:46 +1000 Dennis Plunkett >> writes: >> >25/5/'98 >> > >> >Quick question for you all (I don't have my data book) on the F84, >> >under >> >external interrupt control:- Does the PIC complete the current >> >instruction >> >and increment the PC before entering the interrupt routine? >> >> The real question you're asking is "Does any of the main program execute >> if an interrupt condition exists immediately following the end of the >> ISR? (consecutive interrupts)" The book doesn't say much that would ..... >> answer the question. I suggest trying it. Simply write a short main >> program that toggles a port pin and an ISR that pulses another port pin. >> You can force interrupts to occur constantly by merely setting an >> interrupt enable bit and the interrupt flag bit, then neglecting to clear >> the flag bit in the ISR. The PIC will re-interrupt immediately after the >> RETFIE instruction sets the GIE bit again. >> >> I don't know for sure, but probably no main program instructions will I am sure. I have "test" this. :( "Method": don't clear interrupt flag in ISR. Result: no instruction of the main program will be executed (...StartISR, retfie, StartISR, retfie...). PIC16c84 was used, but it is true for another chips (I think). >> execute. An instruction may be fetched but then the interrupt logic will >> kick in and skip it. -- Vladimir M. Klochko