Re: Accurate(ish) frequency measurement



jure wrote:
[snip lots of good stuff]
3) the system may be pipelined to get one frequency reading per
second, but you will need two interpolators.

could be corrected adding that using one interpolator and producing
one reading per second is possible by using the Delta2 from the
previous measurement as Delta1 of the current measurement.

Ahh, nice! Didn't think of that. I was planning to do the interpolator
calibration prior to the frequency measurement, but for a "continuous"
scheme like this it'd also work quite well to do it in the part of the 1
second interval that's not used for the measurement.

The approach I'm working with now is to simply latch the output of a counter
(fed with the 4 MHz clock) on each 1 PPS rising edge (more or less, with a
bit of logic to handle boundary cases) and then use the interpolator as you
described. With a bit more thought, I think (as you suggest) an ADC such as
the ADCS7476 will work better than the quasi-ADC that I was using (on the
hunch that since I already had most of an ADC there it would be
better/easier). The microcontroller then handles the rest (counter
wrap-around, etc).

A question regarding the interpolator itself ... short term (5-second-ish)
stability-wise, would a constant voltage + resistor be better or worse than
a constant-current source? Stable voltage references are a dime a dozen
nowadays, but I'm not sure how well they'd work if you try running them in
constant current mode. The nonlinearity of using a constant voltage is not a
huge problem since it can be cleaned up by the microcontroller.

I'm still trying to decide on whether to go with discretes or a CPLD.
Unfortunately, CPLDs are only available down here in Australia with extreme
markups - the part I'm considering is a XC9536XL-5PC44 (one of the cheapest
flash-based CPLDs that I could find), which can be bought in single-piece
quantities from dozens of US places for ~$1.50, yet retails here for 10
times that. I can buy a LOT of 74AC discretes for $15. Additionally, I can't
find any CPLDs that can output 5V levels, which is what it's interfacing
with uses. Not impossible to deal with, just annoying, and requires yet
another voltage regulator to power it, or reconfiguration of the rest of the
circuit to 3.3V levels. Obviously, I'm currently leaning quite strongly
towards discretes ...

--
Michael Brown
Add michael@ to emboss.co.nz - My inbox is always open


.