Quoting Scott : > > In general, variables used both in and out of ISRs should be =20 > declared volatile. Take a look at what that keyword means. The =20 > compiler doesn't use optimizations for those variables that it might =20 > otherwise use for non-volatile variables. > > -Scott I remember volatile from my PC C-programming days, but didn't realize =20 now that I'd need it for variables not used in the main code, but used =20 in the ISR. From what I remember back then, in PC C compilers (MS C6, =20 gcc, etc) volatile was not required when all optimizations were turned =20 off. Been too long since I did any real C/C++ programming, so don't =20 hold me to this. Cheers, -Neil. --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .