1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

ServoOut problem

Discussion in 'Oshonsoft' started by Roger Harrold, Oct 25, 2017.

  1. Roger Harrold

    Roger Harrold New Member

    Joined:
    Dec 11, 2013
    Messages:
    18
    Likes:
    1
    I'm using a PIC18F1320 running at 16MHz
    Oshonsoft PIC18F BASIC Simulator IDE

    I'm finding that ServoOut (pin, 100) which should result in a 1mS pulse from pin, actually produces a pulse exactly 900 microseconds wide.
    Has anybody else come across this? Strangely, it only gives 900uS when run on the simulator too, so it's not a hardware problem.

    I've raised a bug report with Vladimir but I have received no reply.
     
    Last edited: Oct 25, 2017
  2. jjw

    jjw Member

    Joined:
    Apr 16, 2012
    Messages:
    266
    Likes:
    15
    Location:
    Helsinki, Finland
    I tested it in the simulator with PIC16F877, clock frequency 8 MHz and 20 MHz.
    Results 908 us and 883 us.
    It is clearly a bug.
     
  3. Roger Harrold

    Roger Harrold New Member

    Joined:
    Dec 11, 2013
    Messages:
    18
    Likes:
    1
    Thanks for that, at least it isn't just me being silly.
    I've written my own servo routine along the lines of:

    High pin
    WaitUs 1000
    Low pin

    I can't find any way to pass pin as a variable but that isn't too much of a problem.
     

Share This Page