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

How a Duplicate Wavetable Endpoint Changes a 1 kHz Output Without Oscillator Drift

A waveform board loops a generated sine table. Its sample clock is correct, but expected 1 kHz output is near 999 Hz. Before reporting roughly 1,000 ppm of oscillator error, check for a duplicate endpoint. If both start phase and the same phase at the end consume a sample period, the loop takes one extra tick.

Drawing one cycle differs from storing a seamless loop

A plotted cycle often shows both endpoints to close the curve. A loop returns to the first sample on its next tick, so the next cycle already provides the endpoint. Storing both copies adds a sample interval at the boundary.

For ideal point-by-point playback, table repetition rate is sample rate divided by effective length. If a table contains multiple cycles, multiply by their count for waveform fundamental. This example concerns a single-cycle table and does not assume commercial generators leave sample rate and interpolation unchanged. Verify actual imported length and update rate.

Equal first and last values alone do not identify a duplicate. A waveform can have intentional holds or end idle. Check phase, period and the last sample's purpose. A finite one-shot waveform can legitimately retain an endpoint.

Worked example: 1,000 and 1,001 points at the same sample rate

Assume exactly one million samples per second. A one-cycle table with indices 0 to 999 contains 1,000 points at 1 µs each, giving 1 ms from one first sample to the next. Appending the endpoint produces 1,001 points and a 1 ms plus 1 µs loop, or about 999.001 Hz.

SetupSample rateEffective number of pointsTable repetition
No duplicate endpoint1,000,000 samples/s1,0001,000 Hz
Appended same-phase endpoint1,000,000 samples/s1,001About 999.001 Hz
Two cycles, no duplicated endpoints1,000,000 samples/s2,000Table repeats at 500 Hz, waveform at 1,000 Hz

A table marker at 500 Hz does not imply a 500 Hz fundamental when the table contains two cycles. Distinguish output period from a trigger marking each loop.

The example error is about 0.999 Hz, or roughly 999 ppm below 1,000 Hz. Different table lengths change the ratio. The extra sample can also alter the boundary and introduce spectral components. Frequency alone does not qualify spectrum.

Retain the file and effective length before changing hardware

Identify what each point represents offline. Keep the array, file, boundary samples and actual imported length. State whether generation uses a half-open interval or includes the endpoint. A graph redrawing the last point at the first cannot establish file length. Fixed spacing and fixed count generation can produce different loops.

Compare both tables at the same sample rate. Use an approved isolated low-voltage board and simulated load without control equipment. Hold reference, sample rate, amplitude and output conditions fixed. If frequency follows table length at an unchanged sample rate, the length hypothesis is supported. If sample rate changes, check automatic resampling or synchronization first.

Record import restrictions and padding. A device may reject, truncate or change lengths to meet alignment. Verify what happened to the last point. If it inserts a wait between loops, length divided by sample rate is not the whole cycle time.

Keep boundary samples across consecutive loops as well as the long-term rate. A mid-cycle capture cannot reveal an extra boundary tick, while a short boundary view cannot qualify the full period.

Specify the reference and waveform separately

If a board needs a 20 MHz, 1.2 V active CMOS reference, SCTF SX2M20.000E20F30TJN is listed in four-pad 2520. Verify supply, load, footprint and full code. Dividing 20 MHz by 20 gives one million sample instants per second on a hypothetical board. Actual devices can use another synthesizer, and this example identifies no fitted part.

Specify sample rate, effective length, cycles per table, boundary and allowable output deviation. Changing the reference cannot remove an extra sample, and changing length does not qualify the clock. Save both results under one project record.

When exchanging calibration tables, keep a short boundary example. Identify phase at the end and the first sample of the next loop. On software revisions compare exported and imported lengths. State continuous or one-shot playback, since they may legitimately treat the endpoint differently.

Frequently asked questions

Can adjusting sample rate until frequency matches qualify the repair? The duplicate endpoint and boundary shape may remain. Verify whether the requirement is exact file playback or a seamless loop.

Do equal endpoint values prove duplication? Check phase and use. Equal values at different phases can both be valid.

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.