I had been working on my biped robot for about a week and it was getting annoying to figure out the amount of cycles needed each time. So I developed a servo position calculator that calculates the angle, cycles delay,milliseconds delay, and microseconds delay for a servo when given at least one variable. It even visually displays the turn of the servo onscreen.
Here are the final formulas for everything . Please note that this is for 16 mHz . If you want it at 1 mhz for the 50 dollar robot just change the main formula to convert mS to cycles. For 16 mHz its mS*466.6 For 1 mHz its 23.2* mS . Just derive the other formulas relating to cycles from that formula, its not so difficult.
The formulas will work as follows , you are given a value and from there you derive the rest:
Key:
Angle is the angle of the turn of the servo. 0 degrees is the center point of the servo . Negative angles are accepted,
mS = Milliseconds delay for the servo
Cycles = cycles delay for the servo
uS = Microseconds delay for the servo
Given : Angle mS = (10(angle) + 1500) / 1000
cycles = (10(angle) + 1500)/1000 * 466.6
uS =10(angle) + 1500