PCM audio for atmega1280

Hi,

i want to experiment with playing back samples on my Arduino Mega, i've found this very interesting article about PCMaudio:

http://www.arduino.cc/playground/Code/PCMAudio

But the problem here is that it's written for the AtMega168 instead of the Atmega1280, and i have no idea on how to adjust it to work with my arduino mega, suggestions anyone?

Thx!

The good news is that the 1280 is pretty much back-compatible, so the direct hardware access stuff ought to work. HOWEVER... it is important to note is that the Arduino pin-assignments are completely different between the standard Arduino and the Mega. Thus the Arduino numbers for PWM pins will need changing - you have 5 or 6 timers to choose between too.

The best documentation for this is in the Arduino environment itself: Look in this file (within your Arduino folder)

hardware/cores/arduino/pins_arduino.c