Society of Robots - Robot Forum
Software => Software => Topic started by: tamamontu on June 22, 2009, 07:18:28 AM
-
Hi.
I am trying to control a servo using ATMEGA168. I have set the timer1 in pwm mode and set the frequency to 50hz and trying to vary the duty cycle from 0 to 2ms. The servo is a 180deg rotation type.
The servo dosent rotate completely.. Can some one pls help.
thanks
-
When you say it doesn't rotate "completely" do you mean 180 deg. or 360 deg?
-
it dosent rotate complete 180 deg.
I went through servo control tutorial in the tutorial section. As per that my understanding is that if i vary the duty cycle from 0ms 2ms.. we can control its complete rotation. I tried to do the same in my code where in i update OCRA1 value from 0ms to 2 ms.