Direct Digital Synthesis is a method to digitally create arbitrary waveforms and frequencies from a single source fixed frequency.
Suppose you have a counter from 0 to 99. If the counter value is smaller than 50 then its output is 0 otherwise its output is 1. If you add 1 to this counter with a rate of 1 kHz then the counter output would present 1KHz/100 = 10Hz. If you would add 2 to the counter at the same rate then the output would present a frequency of 2*1kHz/100 = 20Hz.
The number that is added to the counter is generally called the phase. And by changing the phase you change the output frequency.
Until now we have only created a square-wave output. If another waveform is desired, then we can use a lookup table. Suppose we have a lookup table with 100 entries. The contents of the lookup table present 1 full sine wave. By using the counter output as index into the lookup table you get a sine-wave with the desired frequency. Of course the lookup table can contain any waveform.
The above example had a very coarse resolution, the phase was limited to integer values. If we wanted a 15 Hz value, then a phase of 1.5 is needed. This is not possible because the counter can only handle integer values. We can solve this by increasing the counter from 100 to 1000 and only using the upper 2 digits for the lookup table. This way the phase can be set to 1.5 by actually using the value 15. This method is called fixed-point arithmetic. To create even more accurate frequencies even more digits are needed in both counter and phase.
Practical implementations usually work with 32bit counters and phases. Usually the upper 8 or 10 bits of the counter are used as lookup-table index. The source frequency usually comes from a crystal of 1MHz to 100MHz.
The highest frequency that can be generated this way depends on the size of the lookup table and the frequency. In order to generate a reasonable representation of the waveform you need to use at least a minimum number of samples from it. If the phase becomes too large, then the counter would step through the lookup table too fast and the result would be a sever distortion of the output signal.
Implementation exist in both software and hardware. Due to the realtime nature of DDS, software implementations are usually limited to audio frequencies.
Applications of DDS are: frequency generators, mixers, sound synthesizers.
External link