try just a simple code to make sure your servo is functioning correctly. I found a servo that seemed to drift. I thought it was my code. So i wrote a simple code that sets my pulse widths to left, center and right limits.
Yes I do violate the 20ms refresh rate but if all you care about is moving to positions to verify servo operation this is quick and dirty.
start:
portd.0=1
pausus 1000
portd.0=0
pause 2000
portd.0=1
pausus 1500
portd.0=0
pause 2000
portd.0=1
pausus 2000
portd.0=0
pause 2000
goto start
Nick
Bookmarks