[sdiy] PWM or DAC better for audio out?
ol.gillet at gmail.com
Thu Jun 2 18:54:55 CEST 2011
Tom's post makes me realize that the denomination "PWM frequency"
might be confusing in my post.
If you generate digital sample at 10 MHz, with a resolution of 8 bits,
your effective sample rate is 39kHz (256 digital values are output for
every 8-bit value) ; you can output audio up to 19.5kHz. But the dirty
peak in the spectrum (the "square wave at rest problem") is at 39kHz,
not 10 MHz.
Which brings me to another thing that is not cool with PWM : you need
to double the modulation frequency for every bit of resolution you
add. To get 16-bits, 44.1kHz audio with naive PWM, you would have to
work at close to 3 GHz. To get good resolutions, try sigma-delta
More information about the Synth-diy