Control Servo with PWM on ATmega1280

Hi,

I want to be able to control a servo motor (Futaba S3004) using the PWM of the ATmega1280. How do I do I do all the initializations of registers, and how can I control the servo to turn full clockwise, full counterclockwise, and middle position?

I am using the newest version of AVRStudio (4.18 ) and I am programming in C language.

Your help is highly appreciated! :smiley:

Cheers