On Wed, Apr 1, 2009 at 16:57, Scott wrote: > You have failed to recognize a third state: > Timer1 is running and overflows > 50. You are right, I forgot the third state: * (If Timer1 is on) AND (RA0 is kept pressed) => ignore and continue The reason for this is that the timer should not be reset if it's running. If the user wants to reset, s/he must first stop the timer. Therefore, if RA0 is pressed and overflows go beyond 50 (while Timer1 not running), the overflow check can be aborted since they are no longer of interest here. I hope I haven't forgot to include any vital information. -- - Rikard - http://bos.hack.org/cv/ -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist