Hi - I need some help getting my program to recover from sleep properly. My configuration turns the watch dog timer off, power up timer is on, and the prescaler is assigned to timer 0 (TMR0). I exit sleep using the transition on the external interrupt pin (RB0/INT). The interrupt service routine (ISR) sets iflag and clears the INTF flag. When the sleep instruction is encountered in the code shown below, GIE and INTE have been set so the ISR should excute after the NOP (after sleep). I added 200ms extra delay (delay d'20' below) to allow the oscillator more time to stablilize before returning to the main part of the code (this program is for a frequency counter). What happens on exiting sleep is that program execution ends up in a subroutine called by user_prog (at next1) instead of next2. I can't fathom how it gets there. I've also done a version of this code where I turn GIE off before the sleep instruction and clear INTF and then set GIE after the sleep instruction (and also clear iflag) but get the same result. The code segment below is the main loop of the program. I'd appreciate any ideas on how to debug this. Please respond direct. Thanks. Ron ------------------------------------------------------------------------------ next movlw d'1' movwf flash_1 clrf mflag bsf mflag,0 call select_f goto next2 next1 call user_prog next2 call freq_count call freq_adj call bin2bcd call display_out decfsz iflag,w goto next3 goto next1 next3 delay1 number_off decfsz iflag,w goto next4 goto next1 next4 decfsz flag_sleep,w goto next5 sleep nop delay d'20' clrf iflag next5 goto next2 end