The following kicked me in the nethers twice lately...
I've been doing this for eon's now so I should know better... One of my products has a quadrature counter and I use a pic18 to decipher.... As some of you know, I have recently gone wireless... This means the code in the pic18 has changed to decipher the signal from a serial connection from the module... Anyhwo!!! I have spent two days with 4 dead pics... After banging my head off every wall I could find, I finaly admitted that 4 dead micro's weren't dead.... I have moved to the nano powered k series and the osc settings are next to weird, so herein MUST be the problem.... Transfixed I went gray and bald in quick succession.. I have tried EVERY osc combination....... Nope!!!!
As the code works exceptionally well on a non k derivative, I became blinkered... Aha!!! Then I remembered just under 4 months previous when all the wireless started...
The old encoder fed into the int pin... I have removed the section in the interrupt handler for said deciphering BUT!!!!!!!! I forgot to switch the interrupt off.... As the int pin was floating AND I never clear the flag..... Hey it never comes out of the interrupt...ever!!!
Absolutely nothing to do with being a k series at all....
Just to show how it kills the "joy of programming" Listen and learn....