You are here

Problem to control servo motor | Cypress Semiconductor

Problem to control servo motor

Summary: 3 Replies, Latest post by H L on 15 Oct 2012 01:09 AM PDT
Verified Answers: 0
Last post
Log in to post new comments.
user_139039395's picture
107 posts

 Hi everybody!!

actually i´m working to control a servo motor i read that the frecuency is 20 hz and the duty cycle is 1,1.5 and 2 ms
i´m using pwm16:

parameter pwm16
clock = 1,000,000
period= 49,999
duty cycle = 999-> 1ms->0°
                     1499-> 1.5ms -> 90°
                      1999 -> 2ms -> 180°

but the servo doesn´t work correctly don´t go to the correctly position and keeps vibrating and i don´t understand why,so if someone help me i´m really be glateful
i put my code if someone can check it


graa's picture
Cypress Employee
223 posts

Here are some pointers.


Have you observed the output of the PWM on an oscilloscope to find out if the expected frequency and duty cycle is being generated?


How are you deriving the 1MHz input clock to the PWM?


What is ClockSync parameter set to?  The right setting would be SyncToSysClk

Arvind Krishnan's picture
Cypress Employee
143 posts



Is the servo motor getting sufficient current?


If you are using the power from a DVK, make sure the regulator can supply the required current to the servo.


Also, archive (ZIP) your project and post it here, so that others can have a look at the code.




user_460349's picture
1362 posts

Problem solved in other post.

Log in to post new comments.