• 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.

ServoOut problem

Not open for further replies.

Roger Harrold

New Member
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:


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.

Roger Harrold

New Member
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.
Not open for further replies.

Latest threads

EE World Online Articles