Mcc18 code. Interrupt happens, just unsure why it skips degCtr occasionally. There are never 5 pulses. Only ever 3 or 4. Different pulses will be missing. Unstable interval between failures. Cmp never fails to miss a toggle however. It's a crankshaft/camshaft sensor simulator. Both pwm modules are in use for a poor man's "DAC" but they use other timers. Code has the same issue without USB code and with a different timer. void HighPriorityISRCode() { //A3 silicon errata _asm pop _endasm if(PIR1bits.TMR1IF) { T1CONbits.TMR1ON=3D0; WriteTimer1(degTmrCt); PIR1bits.TMR1IF=3D0; degCtr++; degTDC++; PIR1bits.TMR1IF=3D0; switch(degCtr) { case(28): case(48): case(68): case(88): LATB &=3D CKP_ON; break; case(30): case(50): case(70): case(90): LATB |=3D CKP_OFF; break; case(120): degCtr=3D0; cmpCtr--; if(cmpCtr=3D=3D0) { LATB ^=3D CMP_SIG; cmpCtr=3D3; } break; } if(degTDC=3D=3D60) degTDC=3D-60; T1CONbits.TMR1ON=3D1; } } --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .