Servos and Plusin math


Closed Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2011
    Location
    Los Angeles, California
    Posts
    322

    Default Servos and Plusin math

    Hi All!
    Okay so I know that the pulse width for a servo is from 1 ms to 2 ms with 1.5 ms as neutral. I used Plusin PORTA.0,1,Rawpulse. The variable Rawpulse should display the pulse width to the servo. What I do not understand is why does neutral on the RC transmitter give a Rawpulse result of 380? Thanks, Ed

  2. #2
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default Re: Servos and Plusin math

    It depends on the clock speed. It's in the manual....
    Dave Purola,
    N8NTA
    EN82fn

  3. #3
    Join Date
    Mar 2011
    Location
    Los Angeles, California
    Posts
    322


    Did you find this post helpful? Yes | No

    Default Re: Servos and Plusin math

    Okay, then in the manual the results are given in us units (micro-seconds) which is 1000 time more than in ms (milliseconds). IE "If a 4MHz oscillator is used, the pulse width is returned in 10us increments. If a 20MHz oscillator is used, the pulse width will have a 2us resolution." I am using a 10MHz crystal. Best, Ed

  4. #4
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,521


    Did you find this post helpful? Yes | No

    Default Re: Servos and Plusin math

    So, with a 10MHz crystal the pulswidth is returned in units of 4us, a result of 380 equals a pulsewidth of 1520us.

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts