I'm trying to get down the basics of PIC servo control, and not having much luck. I'm using a 16F690 and trying to get some kind of meaningful movement out of my servo. However, the only thing my servo will do is move to one extreme of its range and sit there, perhaps scornfully.

The offending code is:

@ DEVICE MCLR_OFF,WDT_OFF,PROTECT_OFF
DEFINE OSC 8
servo var PORTC.5
i var byte

loop:

for i = 200 to 400
low servo
pulsout servo,i
pause 18
next i

goto loop


I thought that would get a wiggle out of it, but no. I'm using the internal oscillator there, so I think my timing is correct - the 16F690 is running at 8MHz.

I've tried many different timings, and I've RTFM and RTFDataSheet and RTF-half-the-contents-of-google. I've tried so many tweaks and variations that I'm worried I'll hit the PIC's write limit soon. I've also tried using different servos (from other manufacturers) and a different 16F690. It just moves in one direction to its extreme and sits, every time.

What is it I am missing here? Any help would be greatly appreciated.