My favorite way to handle this 'non-commensurate' intervals problem is to steal a concept from the Bresenham line drawing algorithm. Using the current case: 4.00 MHz crystal 1Mhz instruction rate 256 cycles and prescaler of 64 each overflow of the timer represents 256*64 == 16384 microseconds You start with a counter set to 1,000,000 (1 second in microseconds) On each timer interrupt you subtract 16384 from the counter. If the counter goes negative you update the time by one second and then add 1,000,000 back in to the counter. This technique will work for any interval. It can be made perfect for intervals that have a rational relationship to the instruction cycle time, and can be abitrary close to perfect even for irrational ratios (anybody got any SQRT(2) Mhz crystals handy?) Bob Ammerman RAm Systems (contract development of high performance, high function, low-level software) -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics