I am attempting to replace an ISD17xx (datasheet here:
First, here are small samples of the audio playback from each device taken from a microphone in a very quiet room.
ISD17xx playback
Note, the ISD17xx device is set to sample at 5.3kHz so there is that immediate difference. However, the audio playback from the micro is very tinny or robotic sounding. Viewing the waveforms in Audacity you can see that the ISD playback is 'smoother'. Lots of 'jagged edges' in the micro playback...
My micro is pulling raw audio (8 bit at 8kHz) from memory and stuffing it into the PWM output register. My PWM peripheral is set up at 32kHz (4x sampling rate). The PWM timer is 16 bit and the clock to the PWM peripheral is 20MHz. This results in a timer load value of 625 counting down towards zero. In other words, 20MHz/(8kHz*4x) yields 625 counts. So, each 8 bit value is scaled using (value*625)/256.
The PWM value is updated every 4th PWM interrupt (32kHz/4=8kHz). You can clearly see this here
The relevant portion of the schematic can be seen here
Anything immediately stand out?
--------------------------------------- Posted through