A sweep controller changes its display from 1 MHz to 1.25 MHz, but the scope still reports the old frequency. Keep the existing 25 MHz reference in place and capture FSYNC, SCLK and SDATA at the AD9833 pins. The display shows what the software intended to send. The three traces show which register received the actual data and whether both parts of the tuning word got there. Reconstruct that value before ordering a replacement oscillator.
Calculate the bus traffic you expect to see
For a sine output, each MCLK cycle advances the 28-bit phase accumulator by K, the value held in the selected frequency register. A full turn has 228 steps, so the nominal output is MCLK × K ÷ 228. Work backwards from the desired frequency and round K to the nearest integer. Adjacent tuning words are about 0.09313 Hz apart at a 25 MHz reference. When generating a sweep table, use an intermediate value wide enough for the calculation. Even the product of 1,000,000 and 228 exceeds the range of a 32-bit integer, although the final 28-bit word fits. A table generated with overflowing arithmetic can look reasonable at some frequencies and fail decisively at others.
With B28 set, send the low 14 bits followed by the high 14 bits. Bits 15 and 14 identify the register in both frames, as described by Tables 6 and 8 of the data sheet. The prefix is 01 for FREQ0 and 10 for FREQ1. In the following example, MCLK is assumed to be exactly 25,000,000 Hz, the waveform is a sine, and the two frequencies are loaded into separate registers.
| Target and register | 28-bit K | Low and high fields | 16-bit words in transmission order |
|---|---|---|---|
| 1 MHz, FREQ0 | 10,737,418 | 0x170A and 0x028F | 0x570A and 0x428F |
| 1.25 MHz, FREQ1 | 13,421,773 | 0x0CCD and 0x0333 | 0x8CCD and 0x8333 |
Mask off the address with 0x3FFF and multiply the high field by 16,384 before adding the low field. The first pair gives approximately 999,999.978 Hz and the second gives 1,250,000.019 Hz. Both fields change between these two targets. That makes them useful for testing the full write path. A pair of targets that happens to share the high field can pass even when the driver accidentally uses its low-field-only path.
Follow both frames as far as the device pins
Starting with FSYNC asserted, count the falling edges of SCLK that actually carry the 16 bits. Check the bit order, the cycle that carries the first bit and the edge after the last bit against the manufacturer's timing diagram. A useful first diagnostic is to give each 16-bit word a separate FSYNC assertion. Once that works, capture the production driver's framing too. A decoder that reports the expected hex values can still miss an electrical problem if its threshold or sampling point differs from the AD9833's. Check the setup and hold intervals and signal levels after any level shifter or isolation stage.
Treat the pair of writes as one transaction in firmware. A second task or interrupt that writes the device can interleave another frame or alter the control word while a DMA transfer is in progress. Also check what a log entry means when it says a transfer is finished. Some implementations report the moment it enters a queue. The final clock edge at the device can occur later. With B28 enabled, the manufacturer describes a complete frequency register write after both words have arrived. An output that remains on the old setting after one missing frame is consistent with that behavior. If frames arrive out of sequence, reset and fully initialize the test before drawing conclusions from whatever frequency happens to appear.
Include the control writes in the capture. With B28 clear, HLB selects a separate path that updates either the high or the low field. FSELECT determines which frequency register supplies the phase accumulator. Writing a valid word to FREQ1 leaves FREQ0 active if the selection is still zero. When changing FSELECT, build the full control word from the intended settings so the waveform, reset and sleep bits retain their required state.
Time the change, then check whether the reference accounts for the error
Run two tests on the same board. First select FREQ0, write a different complete word to that active register and capture the serial bus along with the output. Then load both registers and capture an FSELECT change with no new tuning word. The manufacturer's latency section describes seven or eight MCLK cycles before the analog output changes, depending on where the write lands relative to MCLK. At 25 MHz this is approximately 280 or 320 ns. Capture the actual MCLK so that the time marker can be placed against the digital write. Filtering and the trigger point can influence when a frequency meter or scope readout displays a settled number. Keep the write time, waveform transition and measurement settling in separate columns.
After confirming the register operations, compare the relative frequency errors at several settings. For an illustrative reference that runs 20 ppm high, holding K fixed gives a shift of about 20 Hz at 1 MHz or 25 Hz at 1.25 MHz. Those figures are much larger than the rounding errors in the table. Check MCLK at the AD9833 input and use a common instrument reference for the output measurements. An isolated wrong frequency after one update points back to the frames and selection state, even if the repeatability of the existing oscillator has yet to be confirmed.
Leave a test record containing the reference oscillator's full ordering code, its electrical interface and error allocation, the requested frequencies, the two raw hex frames, the active control word and the probe points. If purchasing is asked for a substitute reference, compare supply, output logic, levels, load and footprint with the existing circuit. That record gives the next person enough information to choose between a firmware correction, a clock-source review and a closer look at the analog measurement.
Manufacturer reference · Analog Devices AD9833 Rev. G, serial timing, latency and Tables 6–11
