Appendix C
Frequency Resolution and Lookup Memory
C-2
ni.com
You can also synthesize arbitrary waveforms using DDS. Generating
arbitrary waveforms this way will be very limited; you are restricted to a
single buffer, and this buffer should be exactly equal to the size of the
lookup memory (16,384 samples).
To update every sample of an arbitrary waveform in lookup memory at the
maximum clock rate of 40 MHz, the software writes an FCW value of
2
(N–L)
, where N is the size of the accumulator and L is the number of
address bits of lookup memory (L = 14 bits). Thus, the FCW value for the
NI 5401 equals 262,144. Since FCW = (2
N
* F
a
) / F
c
, F
a
= (2
(N–L)
* F
c
) / 2
N
,
so you would write a frequency value of (2
(32–14)
× (
40
×
10
6
)) / 2
32
, which
equals 2.441 kHz.
If you want to update every sample in lookup memory at an integral
subdivision, D, of the maximum clock rate, then you want an FCW value
of 2
(N–L–D+1)
. In other words, for an effective update rate of every sample at
half the maximum clock rate, write a frequency value of
(2
(32–14–2+1)
× (
40
×
10
6
)) / 2
32
, which equals 1.221 kHz.