A project of mine is almost finished. The final(?) problem seems to be I cannot get the interrupt working properly. Consider this (extracted) code: init banksel INTCON ; Clear all but Timer1 interrupt-masks clrf INTCON clrf PIE1 clrf PIE2 bsf PIE1, TMR1IE bsf INTCON, GIE ; Enable global interrupts banksel T1CON ; Setup Timer1 bsf T1CON, T1OSCEN ; Enable internal oscillator bsf T1CON, TMR1CS ; Use external clock (built-in 32kHz) call delay_5_secs bsf T1CON, TMR1ON ; Start timer1-oscillator mainloop: goto mainloop ; Just for the sake of nothing isr_code bsf TMR1H, 7 ; set TMR1H to 0x80 context_save ; save variables/status etc bcf INTCON, INTF ; Clear hardware interrupt flag btfsc PIR1, TMR1IF ; Did Timer1 overflow? call once_a_sec ; Yes, do our timer-stuff context_restore ; restore variables retfie once_a_sec bcf PIR1, TMR1IF ; Reset interrupt flag bcf PORTA, 4 ; turn off the red LED bsf PORTA, 5 ; turn on the green led return Expected behaviour: After the PIC is switched on and after a delay of 5 secs (it's there to ensure proper oscillator-startups), the red led should be turned off and the green turned on. What's happening: The red LED keeps on being lit, which means that I've either done the init wrong and the ISR is never called, or the ISR is wrong. I am using the internal 32kHz-oscillator in the 16F886-chip. Or, that's atleast what I want to. Are there any obvious errors I've done? -- - Rikard - http://bos.hack.org/cv/ -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist