go away spammer

Author Topic: need some help for servo control  (Read 1629 times)

0 Members and 1 Guest are viewing this topic.

Offline tamamontuTopic starter

  • Beginner
  • *
  • Posts: 3
  • Helpful? 0
need some help for servo control
« 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

Offline apc3161

  • Jr. Member
  • **
  • Posts: 36
  • Helpful? 0
Re: need some help for servo control
« Reply #1 on: June 22, 2009, 03:08:44 PM »
When you say it doesn't rotate "completely" do you mean 180 deg. or 360 deg?

Offline tamamontuTopic starter

  • Beginner
  • *
  • Posts: 3
  • Helpful? 0
Re: need some help for servo control
« Reply #2 on: June 22, 2009, 07:04:24 PM »
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.


 


Get Your Ad Here

data_list