Thanks for the tips. It is true that since the timer registers are only so large you can only get so much resolution out of them, and that there are ways to get around that with external circuitry. But if you don't use the prescalar and the frequency is not too high (<<50MHz) then you can have the more accurate count with a tradeoff of frequency range. Why stop the timer, btw? Reads do not (read: should) affect the count. Read the low byte into W, put it into another register, then get the high byte - the counter can't go fast enough to increment the high byte by the time it executes 3 instructions - and the interrupt latency could even be accounted for... -Adam Peter Onion wrote: >DONT USE A 16F84 !!!!! > >The designs using 'F84s need some extra gates around them so that the value in >the TMR0 prescaler can be discovered. You need to do this inorder to get at >the least significant bits of the total count. > >Use a PIC with more timers in it ... I have a 16F877 on the bench that is >measuring the frequency of a 5-5.5Mhz VFO and keeping it on frequency (+/- >10Hz) using a varicap diode controled by the PWM output. > >All I needed external to the PIC was a buffer (see earlier thread on diriving >PIC from 5.5Mhz oscilator) to get the 1.2V pk-pk signal to TTL levels and a >simple RC filter on the PWM output to give a smoothed control/feedback voltage. > >Beware of trying to read PIC counter/timers while they are running, despite >what it says in the data sheet, the errata say always stop the timer before >reading the values in the high and low bytes. > >Peter > >-- >http://www.piclist.com hint: To leave the PICList >mailto:piclist-unsubscribe-request@mitvma.mit.edu > > > > > -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu