J
John Larkin
Guest
To make a programmable-frequency clock, the usual DDS chip has
A frequency-set register, N=32 or 48 bits or something
which adds, every clock, to a phase accumulator
M most-significant bits of that goes into a sine lookup table
Which clocks D bits into a DAC
Which drives a lowpass filter and a comparator.
(Ignoring DAC quantization and zero-order hold, this is the tail end
of the Shannon sampling theorem.)
Why do the sine lookup? The ms D bits of the accumulator are a
triangle waveform. Why not DAC and filter that? The lowpass filter
wouldn\'t know... it would interpolate as usual.
Why not use some clever VHDL and make a trapezoid with faster rise
time, especially at low frequencies where time quantization and
comparator errors make a lot of period jitter and the filter doesn\'t
interpolate.
If one just takes the MSB of the phase accumulator, you have a
programmable-frequency clock without all that other junk. But its
period is quantized to the clock, which gets totally ugly at high
frequencies. I wonder if some clever math could make that output
always some perfect multiple of, say 1 Hz or 1 mHz.
Somebody left a bag of second-rate coffee in the freezer at the cabin,
otherwise I\'d figure all this out myself.
--
John Larkin Highland Technology, Inc trk
The cork popped merrily, and Lord Peter rose to his feet.
\"Bunter\", he said, \"I give you a toast. The triumph of Instinct over Reason\"
A frequency-set register, N=32 or 48 bits or something
which adds, every clock, to a phase accumulator
M most-significant bits of that goes into a sine lookup table
Which clocks D bits into a DAC
Which drives a lowpass filter and a comparator.
(Ignoring DAC quantization and zero-order hold, this is the tail end
of the Shannon sampling theorem.)
Why do the sine lookup? The ms D bits of the accumulator are a
triangle waveform. Why not DAC and filter that? The lowpass filter
wouldn\'t know... it would interpolate as usual.
Why not use some clever VHDL and make a trapezoid with faster rise
time, especially at low frequencies where time quantization and
comparator errors make a lot of period jitter and the filter doesn\'t
interpolate.
If one just takes the MSB of the phase accumulator, you have a
programmable-frequency clock without all that other junk. But its
period is quantized to the clock, which gets totally ugly at high
frequencies. I wonder if some clever math could make that output
always some perfect multiple of, say 1 Hz or 1 mHz.
Somebody left a bag of second-rate coffee in the freezer at the cabin,
otherwise I\'d figure all this out myself.
--
John Larkin Highland Technology, Inc trk
The cork popped merrily, and Lord Peter rose to his feet.
\"Bunter\", he said, \"I give you a toast. The triumph of Instinct over Reason\"