Audio out using PCM (synth trial runs)

The smaller the prescale factor, the higher the frequency, so to achieve maximum frequency, you want to set the low three bit of TCCR1B to 0x01. You shouldn't simply assign a value to TCCR1B, as it will write to the other bits (they might happen to already be 0, but it's not good to rely on that).

F_CPU is the speed of the clock running the chip: 16 MHz. The frequency of the PWM wave, however, is determined by the timer overflows which happen every 256 increments of the timer. And the current frequency of the PWMs is around 1 KHz. So: 1 KHz * 64 * 256 = ~16,000 KHz = 16 MHz.

The reason this sort of thing isn't in the reference is because it's more advanced than we think is appropriate for the Arduino (like anything that involves messing around with registers and bit manipulation). A method for setting the PWM frequency, however, has been a frequent request, and I hope to find a simple way to provide that functionality. Suggestions welcome. Also, consider writing these issues up for the Arduino playground so that more advanced users can take advantage of the information.