Scott Dattalo wrote: > >Scrap it. > >Here's a routine that gives you 3-cycle resolution: most of routine snipped BRAVO! BRAVO! Fantastic! Talk about lateral thinking! I have 2 observations: I don't see any way for the routine to time out. It looks as if I can either look after the watchdog or have timeout capability but not both. I'll keep looking, tho. The other observation is slightly more serious, I think. If the routine exits without incrementing any counters, (enters the routine but the pin went or was non-active - zero time) an erroneous result will occur. I think the solution is simple: relpace the 'SKPZ' below with 'SKPC'. Of course - I might be out to lunch . . . This is at the end of the normalisation routine: > > MOVF count_3lsbs,W > ADDWF count_low,F > SKPZ > goto done > > INCFSZ count_mid,F > goto done > > INCF count_high,F > >done This is extremely impressive, Scott. Many thanks. dwayne