You are not finishing ISR routine correctly!
#pragma code low_vector = 0x18
void lowvectinterrupt(void){
_asm goto lowisr _endasm
}
After ISR execution the interrupt must be switched on again, so the lowvectinterrupt
must be finished with RETFIE
instruction and at least flags and WREG register must be restored.
Normaly is in ISR routine declared like:
static void interrupt isr(void)
{
}