Post
by cornutt » Wed Nov 20, 2013 7:35 pm
Hmm. Let's do the math. Take your garden variety 16-bit DAC, set up for an output voltage range of 0 to 10 volts. 16 bits provides 65536 (2^16) possible output values. Assuming the DAC's output is scaled linearly, the step increment between any two adjacent values is about 0.15 millvolts. Any value N that I send the DAC will result in an output that is N * 0.15 mV.
The DAC will hold that output value until I send it another value. When I do send it another value, its output will jump more or less instantaneously to the new value. If I send it output values on a periodic basis, I can approximate a waveform. The "easiest" waveform to reproduce with the DAC is a square wave. To make a square wave, I send it output value A, let that hold for a period of time, send it output value B, let that hold for an equal period of time, send output value A again etc. How fast I can send these values determines the maximum frequency of square wave I can produce. I need to send two values (A once and B once) for each cycle. So if I can send values to the DAC at a rate of, say, 16000 times per second, then given that I need to send two per output cycle, the maximum frequency of square wave I can produce is 8 KHz.
We can use the DAC to send values that allow us to approximate other waveforms. However, any other waveform we generate is going to have the frequency spectrum of a square wave imposed on it. How "loud" this square wave is in the output depends on the waveform we're approximating, but it's always there to some extent or another. The fundemental frequency of this square wave is half of the DAC output rate, per our example above. This is why we need output clocking filters: to get that unwanted square wave out of the output. The filter has to take effect at a low enough frequency to get adequate cutoff of the square wave fundemental. As a practical consequence, this usually means we need to set up the system so that frequency is somewhat above the highest frequency that we wish to produce in the output, since practical filters have finite slope.
Most pro audio ADC/DAC systems operate at a minimum frequency of 48 Khz. That gives a frequency for the "clock" square wave fundemental of 24 KHz, above the maximum 20 KHz frequency that we generally take as the top end of the audio spectrum. Back in the day, the sampling frequency for the ordinary audio CD format was chosen to be 44.1 KHz, giving a clock frequency of 22.05 KHz, just barely above the 20 KHz maximum desired frequency. This caused a lot of problems with early CD players since the difference is only about 1/10 of an octave, and with technology of the day it was very difficult to build a filter that would go from passband to a high degree of rolloff in that short a span, and early CD systems had a lot of problems with the clocking filters not being flat at the upper end of the audio spectrum, producing a variety of undesirable effects. Filters have gotten better since then, but the trend in pro audio has been to go to much higher sampling frequencies to move the clock frequency further away from the audio band, which makes it easier to build a good clock filter.
Incidentally, the above applies to any sampling process, whether it's analog or digital. Analog delays that use bucket-brigade samping have the same problems with stepping and needing clock filters.
Switches, knobs, buttons, LEDs, LCD screens, monitors, keys, mice, jacks, sockets. Now two joysticks!