Hi,
I have a low cost audio playback (speech only) project and wish to use PWM reconstruction. Currently I playback at 8KHz and I'm exploring the quality at various bit resolutions from 12 down to 8-bit
I do have it working but I'm suffering from some intermittent breakthrough noise spikes which kill the audio quality. At first I thought its just my breadboard circuitry that needs better grounding, shorter leads etc however I then decided to carry out a simple test which also highlighted the same problem.
Hardware
The primitive test h/w simply comprises of a RC filter with around 4KHz cut off frequency (and an ac coupling cap). I've made the leads as short as possible by soldering the components close to the relevant port connections. P1.9 PWM05; P3.2 for GND.
Software
The PWM frequency for the waveform shown was set at 64KHz. To catch the noise the easiest way I found was to generate an upward and downward ramps (sawtooth). To do this I use the clock module in TI-RTOS to generate calling a function at 8KHz. In the function I simply inc or dec a counter and use 'MatchSet' to alter the mark/space smoothly and so generate the sawtooth waveform. (The code has a lot of excess baggage but it would be possible to minimise it if really necessary.) What's interesting is that the noise often (but not always) appears as a group of 4 spikes and is always on the same slope. Increasing the PWM frequency to 250KHz and above reduces the noise significantly however of course I lose bit depth and can only do this for 8-bit.
Have you in TI tried to generate analog out from PWM and have you seen similar behaviour. Do you think the source would be RF coupling, power lines or other and would you have any suggestions to minimise this ?
Is there a way (h/w or s/w) to easily switch off the RF transmission to see if the noise disappears.
Thanks for your support. Any suggestions welcome.
regards,
Stuart