Peter Cousens wrote: > > The trick is to wire an I/O pin to the TMR0 input, in parallel > > with the incoming signal... You make the I/O pin a hi-impedance > > input while TMR0 and its prescaler are counting incoming pulses, > > then you make it an output and use it to manually clock "extra" > > pulses into the TMR0 input until the TMR0 register increments. > > > > At that point, you subtract the number of extra pulses that you > > generated from 256 (or whatever divide-by ratio your prescaler > > is set to)... The result is the value of the prescaler when you > > stopped counting incoming pulses. > > Yes I understand what your saying > and thanks for the info > But this will only give you 256 > resolution, to be of much use you realy need a few more bits No, Peter... It gives 16 bits of reolution. Remember that the total pulse count is the 16-bit quantity represented by the TMR0 register AND the prescaler, so the counter's range is [0-65535]. -Andy === Andrew Warren - fastfwd@ix.netcom.com === Fast Forward Engineering - Vista, California === http://www.geocities.com/SiliconValley/2499