Author Topic: how to code servo motor PWM in c code  (Read 641 times)

0 Members and 1 Guest are viewing this topic.

Offline gorutiwari17Topic starter

  • Beginner
  • *
  • Posts: 3
  • Helpful? 0
how to code servo motor PWM in c code
« on: September 10, 2013, 01:15:44 AM »
hey bro.... i am using P89v51rd2 microcontroller....
so how to operate servoMotor.. program in embeded C

Offline newInRobotics

  • Supreme Robot
  • *****
  • Posts: 1,015
  • Helpful? 48
  • N.I.R.
Re: how to code servo motor PWM in c code
« Reply #1 on: September 10, 2013, 01:41:54 AM »
If it's a hobby servo driven by PWM, then to drive it You need to generate 50Hz PWM wave, with pulse width between 1ms and 2ms. From quick Google search I did not find much information about how to generate PWM with P89v51rd2, making me think that P89v51rd2 is not a popular uC between hobbyists, meaning that You'll have to study datasheet Yourself as well as come up with Your own code.

--> P89V51RD2 Datasheet
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian W

Offline gorutiwari17Topic starter

  • Beginner
  • *
  • Posts: 3
  • Helpful? 0
Re: how to code servo motor PWM in c code
« Reply #2 on: September 12, 2013, 08:14:48 AM »
thnx for response buddy........ i'll try to make it.. (y)

 


Get Your Ad Here

data_list