Dear Malcolm Peill, Malcolm Peill on 2001-06-18 11:04:51 AM admitted a lack of knowledge when he said: >I have to admit to never having used interrupts before, so it may be obvious >to those who have..... > >My code includes the following: > > ORG 0x000 ; processor reset vector > goto main ; go to beginning of program > ORG 0x004 ; interrupt vector location > > bank_low > CLRWDT > btfss PIR1,TMR1IF ;return if it wasn't a timer1 interrupt Yes, it's obvious. Interrupt routines need to save all kinds of stuff at the beginning of the interrupt routine, then restore them at the end of the routine. It's a little tricky, so everyone starts with the code in the _PIC16F87X data sheet_ by Microchip Technology Inc. http://www.microchip.com/0/lit/pline/picmicro/ p. 132: Example 12-1: Saving Status, W, and PCLatH Registers . Also be sure to use http://piclist.org/techref/microchip/isrregs.htm for a few improvements. -- David Cary -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.