PWM assemly code to control servo motor

LINIX Brushless, VEXTA Brushless, RC Servo, DC Geared, Linear, Stepper, Tamiya.....

PWM assemly code to control servo motor

Postby KLucifck » Wed Nov 24, 2010 12:46 pm

I writing my program in assembly code. I have make 1mS on and 19mS off pulse. I test is with oscilloscope and get the result. But when i connect to the servo motor, it suppose to rotate to 0 degree, but it rotated to 180 degree. So may i know what is the problem? What can i do?
KLucifck
Greenhorn
 
Posts: 2
Joined: Wed Nov 24, 2010 12:38 pm

Re: PWM assemly code to control servo motor

Postby hyng » Wed Nov 24, 2010 4:45 pm

Then try give 2ms on and 18ms off. The servo should rotate to the other end. ;)
User avatar
hyng
Moderator
 
Posts: 292
Joined: Thu Apr 16, 2009 11:35 am

Re: PWM assemly code to control servo motor

Postby KLucifck » Thu Nov 25, 2010 10:17 am

It does not work d. No matter wat pulse i give to the servo motor, it still goin to the 180 degree. Even i may the on time time shorter or longer, it still rotate to the 180 degree.
KLucifck
Greenhorn
 
Posts: 2
Joined: Wed Nov 24, 2010 12:38 pm

Re: PWM assemly code to control servo motor

Postby shahrul » Thu Nov 25, 2010 1:39 pm

KLucifck WROTE:It does not work d. No matter wat pulse i give to the servo motor, it still goin to the 180 degree. Even i may the on time time shorter or longer, it still rotate to the 180 degree.

It rotate and not moving.
You try to set 2 position. Then you try-and-error the minimum and maximum duty cycle. Duty cycle for servo is small. 0.5ms-2.5ms out of 20ms. Some servo maybe a little different timing.
User avatar
shahrul
Professional
 
Posts: 812
Joined: Sat May 16, 2009 9:54 pm
Location: Selangor


Return to DC Motor

Who is online

Users browsing this forum: No registered users and 11 guests

cron