Servo Pulse period at 8mhz


Closed Thread
Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2005
    Location
    Bellevue
    Posts
    125

    Question Servo Pulse period at 8mhz

    Hi all:

    I have been looking for information about what the period for Pulsout would be for an 8 mhz 16F88. I have a program that is working at 4mhz, but want to move it to 8mhz.

    The servo I am using now responds now to pulsout from 90 to 250 but at 4MHZ...

    At 8 mhz what would these values be? How does one think about this - I have no mental model for what is going on...

    Thanks,

    Tom

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    multiply your value by 2
    The resolution of PULSOUT is dependent upon the oscillator frequency. If a 4MHz oscillator is used, the Period of the generated pulse will be in 10us increments. If a 20MHz oscillator is used, Period will have a 2us resolution. Defining an OSC value has no effect on PULSOUT. The resolution always changes with the actual oscillator speed.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  3. #3
    Join Date
    Feb 2005
    Location
    Bellevue
    Posts
    125


    Did you find this post helpful? Yes | No

    Default

    And if NO Osc is used as with the 16F88 internal??? I am running at 4mhz now, and have seen mention of how to run at 20mhz.. BUT what about 8mhz..

    does a '100' at 4 mhz = a 50 at 8mhz? Or is it a '200' ? or is it linear?

    TG

  4. #4
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    let's trim the above quote
    If a 4MHz ... in 10us increments.

    If a 20MHz ... 2us resolution.
    So if you have '100' @ 4Mhz... you'll have '200' @ 8MHZ. Of course it's linear as the OSC definition don't change anything in the result.

    It doesn't matter if you use the internal or the external one... must have some heartbeat somewher
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  5. #5


    Did you find this post helpful? Yes | No

    Default

    TG,

    Don't forget to add:

    DEFINE OSC 8 at the start of your program. This is needed to adjust other time dependent commands.

    I also run my servos with 8 mhz. For PULSOUT do as MisterE says and multiply by 2. So, if your old servo range was 90 to 250 your new range will be 90*2 to 250*2. The servo will move the same number of degrees but with greater resolution.
    Last edited by Dick Ivers; - 10th October 2005 at 14:03.

Similar Threads

  1. DC to servo pulse converter
    By Agent36 in forum General
    Replies: 2
    Last Post: - 16th December 2009, 06:09
  2. Timer + rc5
    By naga in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 19th November 2009, 07:56
  3. More Servo Woes
    By chrisshortys in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 13th May 2009, 08:40
  4. RC5 decode on a 10F + Question
    By ultiblade in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 11th September 2008, 08:20
  5. R/C Servo pulse Monitor
    By Harddkyss in forum Code Examples
    Replies: 7
    Last Post: - 25th February 2007, 15:00

Members who have read this thread : 0

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