This calculator has several distinct functions. First, it's an assistant for selecting tuning words given a reference clock and desired output frequencies and/or phases. Second, it shows the tuning word and other configuring bits encoded as a sequence of hex codes for use in programming the AD9833 via its serial interface. Lastly, idealized output harmonics are shown for the selected reference clock and output frequency after an external reconstruction filter has been applied. Addressing each of these individually:
Tuning words are calculated by simply entering the desired MCLK and output frequency. Because a tuning word is limited to 28 bits, there is typically a small deviation between the desired and actual output frequencies. The actual output frequency (shown to the right of the desired frequency, surrounded by a gray field) is what is encoded in the bottom 14 bits of each codeword. Tuning words greater than 8000000 H (4000(LSB) 6000) exceed the Nyquist frequency and may cause error messages to appear. Phase is quantized to 12 bits and selected in a manner similar to output frequency. The closest available phase setting appears in a field at right and in the last 12 bits of the corresponding hex code.
Individual register hex codes can be selected from a pulldown menu labeled "Codewords" with the codes displayed in fields to the immediate right. The control register word is shown separate from the data word(s), but all words must be sent in order to program the register. The hex code fields can also be modified so that a programmed frequency and phase can be retrieved from the hex. A complete codeword sequence to initialize all registers appears immediately below this, in a field labeled "Init. sequence". It only updates when "Update" is clicked and modifying the values displayed here won't update the form fields above. Below the init codes is a "History" field which shows only those registers touched since the last time "Update" was clicked.
If this browser is Java-enabled, a harmonic images calculator appears at bottom which graphs the first four harmonics of the output frequency (in red, sin(x)/x envelope in light red) and lists the first 16 in a table which can be cut and pasted into a spreadsheet. Changing the sampling (reference clock) or output frequencies at top automatically updates the images calculator, but the reverse is not true. Spurs (blue) are are also shown as folded 2nd or 3rd-order harmonics of each image with a uniform SFDR dependent on MCLK and programmed frequency.
Suppression of images and spurs (waveform reconstruction) can be simulated by selecting corner frequency, filter order and type of a simple analog filter (last line of images calculator; magnitude rolloff shown in green). A region corresponding to 10 bits of quantization noise is shaded at the bottom of the graph for reference. This calculator is based on a highly simplified model of the AD9833: check datasheet for parameters appropriate to your application. For more information, see our DAC Images calculator.
Note: Some parametric limits have been omitted/simplified in the implementation of this calculator. Refer to datasheet for actual limits and specifications.