10 Replies Latest reply on May 27, 2014 6:20 AM by user_14586677

    Problem to control servo motor

    jose.morales

       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