Brooke Clarke wrote: > Hi KPL: > > The idea is that when the prescaler is used with Timer 0 (this is an > 8 bit timer/counter) the count frequency can be as high as 50 MHz > (there are requirements about the prescaler setting). This works > with most PICs on TMR0. It does not work on Timer 1 (the 16 bit > timer/counter). The PIC spec is in terms of time not frequency so > it's easy to miss. I just did a project where I PWM a varactor diode to keep an LC oscillator on frequency (tinkering ;-). I used TMR1 as the counter since it was 16 bits and could be incremented asynchronously, TMR0 is always synchronized. It can't be clocked quite as high as TMR0, but can be clocked at over 16MHz (assuming 50% duty cycle). By not using the prescaler, and by trapping TMR1 overflows, I acheive 1Hz resolution at up to 16MHz (24 bit count) without having to dink external prescalers or TMR1 itself to see what the prescaler contained. The down side is that because it is unsynchronized you have to stop it to write to it or strange things happen. I'm using a frequency of 9.545MHz for the LC oscillator and the PIC has no trouble counting it accurately. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist