> A friend of mine once built an Acorn Atom add-on that allowed him to > measure resistance or capacitance by timing the frequency or period of an > RC oscillator. For high frequencies, it's more accurate to count cycles. > At low frequencies, it's better to time the period. > > At some frequency between, the two methods are equally accurate. > He worked out this crossover point, and thus the accuracy was always > guaranteed better than a minimum figure. An alternative which will always give maximal accuracy, but which requires a little more calculation effort, is to time as many pulses as will fit in a second; then take the time from the first to the last and divide that into the number of event intervals received. If the signal is, e.g., 100.7Hz you may receive 101 pulses, with 993,050us between the first and the last. Dividing 0.993050 into 100 event intervals yields 100.700Hz (if the time is accurate to within 10us). This approach is often far more acc- urate than pulse-counting or period-measurement alone.