How can you control a Servo using a Basic Stamp?
Asked
Active
Viewed 357 times
1
-
http://forums.parallax.com/forums/default.aspx?f=6&m=164400 – SixOThree Nov 02 '09 at 23:59
1 Answers
4
Servos' positions are determined by a pulse width signal with a repetition rate of typically 50Hz, so one pulse every 20ms.
The servo's neutral position (halfway) agrees with a 1.5ms pulse width. Shorter pulses will rotate the servo to the left, longer pulses to the right. So all you have to do is periodically create pulses. This document has a servo control demo on page 146. The code used in this demo is simply
PULSOUT Servo, (pWidth */ PwAdj) ' move the servo
PAUSE 20 ' servo refresh delay

stevenvh
- 145,145
- 21
- 455
- 667