Mike Keitz wrote: > > PICs make good frequency counters. Without external components (other > > than amplifying the signal up to TTL levels), any PIC can count a 50 MHz > > signal to a single cycle. and Peter Cousens replied: > How ? a prescaler is out of the question if your counting "to a > single cycle" > > You must mean 5MHz No, Peter, he meant 50 MHz. 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. -Andy === Andrew Warren - fastfwd@ix.netcom.com === Fast Forward Engineering - Vista, California === http://www.geocities.com/SiliconValley/2499