PWM Freq. I can't change it - please help :-(

here's some actually useful information. I didnt read all the posts, but yes you can change the pwm frequencies. There are 8bit and 16bit pwm options. I really haven't looked into it too much since i just had to change it for one job.

is a great article. Really you want phase correct pwm if possible, unless you need pwm above about 30khz.

for the 8 bit timers, start reading page 94 of the 328P datasheet
you can set N on the equations by looking at page 110. Really the whole 8bit pwm section is only 9 pages.

If you need more resolution look at the 16bit.

The closest you can get to 500hz without using the cpu's time is 490hz.

  pinMode(3, OUTPUT);
  pinMode(11, OUTPUT);
  TCCR2A = _BV(COM2A1) | _BV(COM2B1) | _BV(WGM20);
  TCCR2B = _BV(CS22);
  OCR2A = 180;
  OCR2B = 50;

and just set OCR registers to whatever you want your duty to be

another useful setup for pwm that's about 32khz:

  //ultrasound pwm setup
  pinMode(3, OUTPUT); //3 and 11 are fans
  pinMode(11, OUTPUT);
   TCCR2A = _BV(COM2A1) | _BV(COM2B1) | _BV(WGM20);
  

  TCCR2B = _BV(CS20);
  OCR2A = 255;
  OCR2B = 255;

really read those about 15 pages and look through the equations and divisors to find the frequency you want. If that doesn't work then use the 16bit pwm options

To the guy who suggested using a software cpu controlled pwm:... seriously?