Specialist Supplier of Crystals & Frequency Control Componentssales@mecxtal.com.cn0755-26500570
MERLIN home / Rednote / System Validation and Replacement

Why do the two MCP4922 outputs update at different times on a board with a 20 MHz oscillator?

Both analog outputs originate in one MCP4922, and the application expects them to represent samples from the same instant. A 20 MHz active oscillator supplies the controller reference. Both channels reach the right voltage, but the scope shows one step slightly ahead of the other. Measuring only the final values misses the failure. Check the sources of chip select and LDAC on the schematic, then display both analog outputs in one capture to see which event separated the paired update.

Stage each channel with its own frame, then commit both

Each MCP4922 command occupies sixteen serial clocks and addresses a single channel. With a complete command transferred under chip select, the rising edge of CS loads the corresponding input latch. If LDAC is held low, both channels acquire their new values on their respective CS rising edges. For a paired update, keep LDAC high during both writes. After both commands are complete, drive LDAC low to transfer data into the two output latches together. Each command still gets its own CS frame. Holding CS low across thirty-two bits does not substitute for a pair of valid frames.

Use LDAC as the reference on the scope. If a single LDAC pulse comes after two CS pulses and both voltages subsequently move, the digital commit sequence is as intended. If the output steps follow two separate CS rising edges, check for a hardware strap or for a controller pin that drives LDAC low during boot. Inspect the installed parts on each assembly variant. When the time between the analog steps tracks the time between CS rising edges, the serial commit order explains more of the observation than a mismatch between analog filters alone.

Calculate write time and commit timing separately

Suppose the active 20 MHz oscillator actually supplies the serial peripheral through a divide-by-two path. At 10 MHz SCK, sixteen bits occupy 1.6 microseconds. Both writes occupy 3.2 microseconds before including chip-select margins and pauses between frames. With LDAC tied low, the first output updates at the end of frame one, and the second has to wait through the next frame. The expected separation is roughly 1.6 microseconds plus chip-select and interframe overhead. Any application that requires the voltages to change after a common event fails that requirement with this wiring. A faster serial clock shortens the skew, but the updates still originate at two separate events.

Suppose a 20 MHz controller timer also takes its reference from the same oscillator. Its tick is 50 ns. The data sheet specifies at least 40 ns from the last rising edge of CS to the falling edge of LDAC and at least 100 ns of low time on LDAC. Two timer ticks just cover the nominal minimum low time. Three complete ticks give a nominal 150 ns starting point for a bench test. Measure both the low width and the separation between the final CS rising edge and LDAC falling edge at the DAC. The timer may take a different divided clock, and a controller instruction writing a register need not change the pin at that instant.

Use the final wire event, then measure analog settling

With DMA, the memory transfer can finish with bits still in the serial shift register. An LDAC pulse generated directly from that callback can update channel A while channel B still holds its previous word. Follow the serial peripheral's actual transfer-complete condition, observe the final CS rising edge, and then pulse LDAC. Alternate two sample pairs with reversed value order and capture CS, LDAC and both analog outputs. A missing second command leaves one stale voltage. Sending the same pair repeatedly can hide it.

Once the digital commits align, measure the analog channels with the loads the product actually drives. The data sheet lists 4.5 microseconds typical for a quarter-scale to three-quarter-scale step to within half an LSB under the specified supply, reference, gain and RC load. Different filters, buffers or harness loads can make the two real outputs reach the allowed error band at different times. Alternate which output makes the larger step, measure the time each enters its band and inspect the reference for simultaneous transients.

Sequential output updates may be acceptable if the equipment waits for both channels to settle before reading them. When both outputs feed an analog computation, a skewed transition can appear as a real differential value. Use a paired commit in that case and allow the measured settling time before sampling downstream. The 20 MHz active oscillator establishes the reference for the example divisors. An oscillator change also warrants checking voltage, supplies and the controller clock route. The common commit edge, complete serial frames and settling curves under load together explain where the apparent misplaced step originates.

With downstream sampling driven by an external trigger, perform one more check before freezing production firmware. With repeated constant data, the samples cannot reveal whether the sampling edge comes before or after the output step. Alternate two levels well apart relative to the error band and record which value pair was actually sampled for each trigger. Carry a trigger identifier into the log so that a late DAC update can be distinguished from software reading the wrong sample.

References

WeChat

MERLIN · TIMING COMPONENTS

Scan with WeChat to contact Sales

Add our WeCom contacts from your usual WeChat app.

On desktop, scan with your phone. On mobile, save the QR image and select it from your album in WeChat Scan.