Recently there were some comments in another thread about microcontroller audio output techniques. (I can't find them now - having to use Google Groups sucks - my otherwise reliable ISP discontinued supporting a dedicated news server), and it leads me to ponder a bit on what the best way to do this is.
On a prototype, using 8-bit audio (voice) data sampled at 8 kHz to drive a PWM output, I just brute-forced the audio output path: A multistage active LP filter (4 kHz corner freq) and a simple PA to drive the earphones/speaker. I'd like to do something smarter/better/ cheaper on the next iteration.
Some options:
1) Multiply the PWM rate by N, reusing the data N times (or perhaps interpolating), cut down on the active filtering required. However, significantly upping the rate chews up processor cycles and increases power. Enough to matter? I dunno yet.2) Make a charge pump out of a tristateable output and internal counters, drive it using differential data, and feed an external integrator. The sampling frequency component at the output would be significantly less compared to the PWM output and thus could result in savings in the filtering circuitry.
3) Implement the "traditional" class-D LC filter output.4) Just try to get the PWM frequency as high as the rest of the system will allow and then drive the earphones/speaker directly, using the speaker/headphones as part of the filter. Certainly cheap, but what about emissions, especially out of probably non-shielded headphone cords?
I haven't thought this all out, but am asking the group for input because I'm sure some of you have already done this thinking for me :-) So, what have you done / would you do?
(P.S. The National LM48511 looks interesting. Have any of you used it?)
-- Silvar Beitel