The DDS_HOLD[n] register can be set to
enable Hold Mode on DDS channel n. This allows the DDS to hold on a vector to
generate a tone with an indefinite length (and constant frequency and amplitude),
and then use the trigger to initiate a frequency or amplitude ramp, and then hold
again at a different frequency and/or amplitude. When Hold Mode is activated, the
following changes apply:
- The initial trigger that enables the DDS output does not also satisfy the
trigger condition of the first vector. See Initial Startup for full
details.
- After the initial trigger, whenever the vector processor is stalled, the DDS
output is not muted. Instead, the vector is started, but runs indefinitely
(waiting for a trigger event). Once a trigger event occurs, the DDS plays
NUM_SAMP_M32+32 additional samples of the current vector before continuing to
the next vector.
- The phase accumulator operates in phase-continuous mode. This makes sure phase
continuous behavior when starting each vector. The PHASE_START value of the
first vector is applied once when the first trigger occurs after startup, but
then the PHASE_START values are ignored for all subsequent operations.
- The length of each vector must be
a multiple of 32 (the NUM_SAMP_M32 field of all vectors must be a multiple of
32).
- Indexing-Mode must be disabled (DDS_IMODE=0).
- Symmetric mode must be disabled
(DDS_SYM[n] must be 0 when DDS_HOLD[n] is 1).
(move to typical application
example) Below is an example use case for a smooth transition between
arbitrary frequencies and/or amplitudes. In this description, vector numbers are
offsets within the channel vector block.
- Set up initial frequency/amplitude:
- Enable Hold Mode (DDS_HOLD) and program vector 0 (DDS_VEC) to the
initial desired frequency and amplitude:
- FREQ_START = desired frequency;
- AMP_START = desired amplitude;
- NUM_SAMP_M32 = 0; FREQ_STEP = 0; AMP_STEP = 0; STEP_EXP = 0;
VTRIG_MODE = 1; LAST_VEC = 0;
- Start the DDS (SYS_EN=1).
- The DDS plays vector 0 indefinitely, and waits for a trigger.
- Ramp to a new frequency/amplitude:
- Once a new frequency or amplitude is desired, program vector 1 to
generate a frequency or amplitude ramp that starts at the initial
frequency/amplitude (from step 1), and ends at the new frequency and
amplitude. Set VTRIG_MODE to 0. The duration of the ramp is set by
NUM_SAMP_M32. Program appropriate values for FREQ_STEP, AMP_STEP and
STEP_EXP. Program VTRIG_MODE = 0 and LAST_VEC = 1.
- Update vector 0 with the new frequency/amplitude (it does not have any
effect yet). Other fields of vector 0 can remain unchanged (same as step
1).
- Trigger the DDS using any triggering method. This causes the DDS to play
vector 1 (the ramp) and then return to vector 0 (which is the new
frequency and/or amplitude). The DDS then holds indefinitely on vector
0.
- Once a new frequency or amplitude is desired, repeat step 2.