I'm thinking (supposing really) that maybe just because a servo has a physical limit, doesn't mean that the electronics inside will let it reach those physical limits. I don't know.
Those marks you made, the black ones, look like a halfway decent 90 degree angle.
How about trying this out for grins:
I changed it a bit, added a bit of code to keep the refresh rate a bit closer to 50Hz. Maybe the newer servo's are a bit more sensitive to that sort of thing.Code:....all the setup you've already got...it looks like it should work just fine.... Start: leftend = 100 : center = 1500 : rightend = 2900 : stepval = 20 : pos = center moveleft: pauseus 20000 - pos 'pause 20ms - servo pulse width, should keep a more constant refresh rate closer to 50hz if pos > leftend then pos = pos - stepval else goto moveright endif servo1 = 1 : pauseus pos : servo1 = 0 : goto moveleft Moveright: pauseus 20000 - pos 'pause 20ms - servo pulse width, should keep a more constant refresh rate closer to 50hz if pos < rightend then pos = pos + stepval else goto moveleft endif servo1 = 1 : pauseus pos : servo1 = 0 : goto moveright end
Also, I changed leftend and rightend to EXTREME values. They're almost GUARANTEED to bind your servo's at the extreme's.
See what happens.
Are you actually using a real 16F628 or a 16F628A?




Bookmarks