I'm leaning towards the volatile specifier on variables, so the compiler doesn't assume the variable is in a register in mainline code when the interrupt routine is changing it in RAM. Also, as I recall, the interrupt was changing a multi-byte variable that was then being evaluated by the main line code. Perhaps part way through the evaluation in mainline code the interrupt changes the variable. Perhaps you can disable interrupts before the evaluation, then enable them after, or disable them, copy to a local variable, enable interrupts, then evaluate the local. Harold -- FCC Rules Updated Daily at http://www.hallikainen.com - Advertising opportunities available! -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist