I am trying to control a high speed pwm esc from the arduino. The problem I am having right now is that the servo library only updates the servos at 50hz. This is fine but for building a quad copter its nowhere near good enough. I need something in the 250 to 400hz range for a really nice stable quad. Analog write is the only option here but it operates at 490hz and needs to be lowered quite a bit.
I found this linkhttp://www.instructables.com/id/BLDC-Motor-Control-with-Arduino-salvaged-HD-motor/step11/Control-Software-for-the-Arduino/
and buried within it I found this link (more important)http://usethearduino.blogspot.com/2008/11/changing-pwm-frequency-on-arduino.html
If you scroll down to the bottom of that link you will see the possible frequencies for the pwm pins.
For pins 6 and 5 (OC0A and OC0B):
If TCCR0B = xxxxx001, frequency is 64kHz
If TCCR0B = xxxxx010, frequency is 8 kHz
If TCCR0B = xxxxx011, frequency is 1kHz (this is the default from the Diecimila bootloader)
If TCCR0B = xxxxx100, frequency is 250Hz
If TCCR0B = xxxxx101, frequency is 62.5 Hz
For pins 9, 10, 11 and 3 (OC1A, OC1B, OC2A, OC2B):
If TCCRnB = xxxxx001, frequency is 32kHz
If TCCRnB = xxxxx010, frequency is 4 kHz
If TCCRnB = xxxxx011, frequency is 500Hz (this is the default from the Diecimila bootloader)
If TCCRnB = xxxxx100, frequency is 125Hz
If TCCRnB = xxxxx101, frequency is 31.25 Hz
I am running with an atmega 2560 not a 328 and thats where my question comes in. On the bigger atmega 2560 can I potentially get 4 pins that operate at 250hz rather than just 2 as the list states? That would be perfect for my quad if I could do it.