> > Don't know, but this might help you... Basically, you compare the frequency > to measure with a known frequency (which usually is the processor's clock). > > There are two main ways. One is to count how many cycles of the frequency > to measure fall within a known time; for example one second. You can use > e.g. the timer 1 in counter mode for this. This method is generally used > when the measuring time is (or may be) long compared to the cycle time. > > The other method is to count how many cycles of the known frequency fall > within a single cycle (or a known multiple of a single cycle) of the > frequency to measure. You can use e.g. the CCP module in capture mode for > this. This is generally used when the frequency to measure is low compared > to the known frequency. > > Which method you choose depends on the frequencies you're looking at, on > the precision and timing requirements, on the available hardware resources > -- and on personal taste :) Sometimes you may want to switch between > methods based on a preliminary first result. > > Gerhard > > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > Thanks! I'm trying to find more like well-commented asm code, since my asm knowledge is not quite good enough to implement this by myself from zero. Anyway, I have to read more about timers. -- KPL -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist