PWM: (how) can I set the frequency?

If I use analogWrite(11,128); my osciloscope tells me that I get a nice 50% block signal on pin 11 (Arduino Uno). The block has a frequency of about 470 Hz. Is it possible to change the frequency of the block signal? If so, how...?

[ EDIT - http://forum.arduino.cc/index.php/topic,46949.0.html and so on... ]

There is a good discussion at http://usethearduino.blogspot.com.au/2008/11/changing-pwm-frequency-on-arduino.html

See "List of possible frequencies" here: http://arduino-info.wikispaces.com/Arduino-PWM-Frequency

To get into the details of how this all works, see: http://arduino-info.wikispaces.com/PWM

I'm a newbie at programming the Arduino, but didn't I see mention somewhere that this will change the timing of millis(), micros(), and delay()? Just something to keep in mind.

I can use that 64kHz PWM output...

I had to do this for my Hydra project. I used the PWM library.

https://code.google.com/p/arduino-pwm-frequency-library/

polymorph:
I’m a newbie at programming the Arduino, but didn’t I see mention somewhere that this will change the timing of millis(), micros(), and delay()? Just something to keep in mind.

I can use that 64kHz PWM output…

@ polymorph, I’m a newbie too, but followed the recipe from http://playground.arduino.cc/Main/TimerPWMCheatsheet by adding this line of code to my (Uno R3) setup():

TCCR2B = TCCR2B & 0b11111000 | 0x01; // Set Timer 2 to produce 31 kHz PWM output (pins 11 and 3)

This indeed changed my PWM frequency at pin 11 to about 31 kHz, without messing up millis() or delay() etc.