@▷ First Servomotor Control Program by PIC16F84 | Diagram for Schematic

First Servomotor Control Program by PIC16F84

In our first program , we will simply sweep the servomotor from CCW to CW and then sweep back. The program will be kept simple as to demonstrate the priniciples of controlling a servo with a the PIC Basic language. The schematic can be seen in figure 2 (below). The variable pw controls the pulsewidth, and is started at 100 (extreme left, -45 degrees). The program sends the pulse out to the servo, and then is increased by a value of 1 until it reaches 200 (extreme right, 45 degrees), at which point it will reverese the rotation.

Read more original source:

http://www.imagesco.com/articles/picservo/02.html

"First Servomotor Control Program by PIC16F84 Search Tags"
Electronic C, microcontrol
Advertiser