Hi Rolf, I believe that the context saving is not right in your code. You likely to overwrite Z flag, however, I can't see any section of your code that would use the zero flag so it might not be the case. Tamas ;------------------------------------------------------------------------------ > ; INTERRUPT SERVICE ROUTINE > > ;------------------------------------------------------------------------------ > > INT_VECTOR CODE 0x0004 ; interrupt vector location > MOVWF W_TEMP ; save off current W register contents > MOVF STATUS,w ; move status register into W register > MOVWF STATUS_TEMP ; save off contents of STATUS register > > Should be: INT_VECTOR CODE 0x0004 ; interrupt vector location MOVWF W_TEMP ; save off current W register contents SWAPF STATUS,w ; move status register into W register MOVWF STATUS_TEMP ; save off contents of STATUS register i_end > > MOVF STATUS_TEMP,w ; retrieve copy of STATUS register > MOVWF STATUS ; restore pre-isr STATUS register contents > SWAPF W_TEMP,f > SWAPF W_TEMP,w ; restore pre-isr W register contents > RETFIE ; return from interrupt > Should be: i_end SWAPF STATUS_TEMP,w ; retrieve copy of STATUS register MOVWF STATUS ; restore pre-isr STATUS register contents SWAPF W_TEMP,f SWAPF W_TEMP,w ; restore pre-isr W register contents RETFIE ; return from interrupt Tamas -- Rudonix DoubleSaver http://www.rudonix.com -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist