A numerically controlled oscillator

You will learn

How a phase accumulator and a sine table make any frequency, and how fine the steps are.

Add a tuning word M to an N-bit accumulator every clock and its top bits sweep around a circle at f_out = M f_clk / 2^N. At 100 MHz with N = 32, M = 2^30 gives 25 MHz, a quarter turn per clock, and the next frequency up is 0.0233 Hz away. The top P bits of the phase address a sine table; the rule of thumb puts the worst phase-truncation spur about 6.02 dB per kept bit below the carrier. The spec signals.t27 picks M and computes every sample.

Open the interactive lesson →