On Tue, 13 Jan 1998, John Payson wrote: > 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. PTM: How does this differ from pulse-counting ? The original problem is still there, however you describe the method: at low frequencies you have only so many pulses. The maximum accuracy will be D=0.5/f/T (T=measurement time). When the measurement time is one second: 0.05% @ 1000Hz, 0.5% @ 100Hz, 5% @ 10Hz, 50% @ 1 Hz ... (If I made it right after 3 h sleep:). The error comes in, because the last pulse in the measurement time will allways be in a different phase than the first. You got to measure the phase difference to make the accuracy better. There you got to use the period-measurement at last for the last pulse. To do that, you've got to have a system which see to the length of the last pulse in advance. OR measure continuously with both methods. If you want to have the same accuracy all the time, you have to measure the same amount of pulses every time. For example 500 to have an accuracy of 1%. This is even worse, because the frequency can change between the start and stop moments. To compensate this you have to make parallel measurements and indicate somehow that there has been some kind of a change. Measuring a frequency with accuracy of 1% makes allways the last number to be '8' if you have a display with 4 digits and the frequency is >1000Hz. -------------------------------------------------------------------------- PTM, pasi.mustalahti@utu.fi, ptmusta@utu.fi, http://www.utu.fi/~ptmusta Lab.ins. (mikrotuki) ATK-keskus/Mat.Luon.Tdk OH1HEK Lab.engineer (PC support) Computer Center OI7234 Mail: Turun Yliopisto / Fysla, Vesilinnantie 5, 20014 Pt 02-3336669, FAX 02-3335632 (Pk 02-2387010, NMT 049-555577) --------------------------------------------------------------------------