HH> I'm leaning towards the volatile specifier on variables, so the compiler HH> doesn't assume the variable is in a register in mainline code when the HH> interrupt routine is changing it in RAM. Also, as I recall, the interrupt HH> was changing a multi-byte variable that was then being evaluated by the HH> main line code. Perhaps part way through the evaluation in mainline code HH> the interrupt changes the variable. Perhaps you can disable interrupts HH> before the evaluation, then enable them after, or disable them, copy to a HH> local variable, enable interrupts, then evaluate the local. HH> Harold This is the .lst file which was generated by C18 : http://electronica.asm.ro/bcomputer/pic18f252_interrupt.lst I inserted a
so it can be read inside a browser. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist