I recently started a project to implement a Code Excited Linear Predictive (CELP) decoder on Atmega2560, which can store approximately 3 minutes on compressed voice (4.8kbps at 8kHz sampling) on 256kbyte flash Atmega2560.
I don't want to add DAC hardware chip for sound output, so I downloaded the PCMAudio code at http://playground.arduino.cc/Code/PCMAudio
for 8 bit PWM playback for testing on my Arduino Mega2560. But unfortunately it doesn't work. I checked the running of the code, the interrupt rountine seemed working but just didn't have any PWM signal output from Pin 11.
The orignal code was designed for Atmega168 not Atmega2560. I wonder if this is the problem of malfunctioning.
I am not familar with programming the timers on AVR processor, so please help if I need to modify the code for running on Atmega2560, or point me to other code for PCM sound output (using PWM) that can run on Atmega2560.
Thanks in advance