An RC Servo tester

An RC Servo tester
Related Videos

RC servos are controlled by a signal that goes high for between 1ms to 2ms. This pulse is repeated every 10 to 20ms, but it's timing does not control the position of the servo.

Originally, the idea was a program to output a different width pulse on each port B output and it still does. Connect the control wire from the servo, to a different pin on port B, and the servo should move to a new position. This code is module T2. It starts by setting all the bits in Port B and Port A. It then runs through a set of inline delays, and each time, it resets a bit.

This works, and the servo position remains stable.

The 16F628, has an internal 4Mhz Oscillator, and I have disabled the MCLR pin, so no pull up resitor is required. Do not forget to connect 0V to pin 5, and 5V to Pin 14, and 5 volts to the Servo

PICS do not like voltages above 5.5 volts, so decouple the Supply to the PIC from the Servo supply.

Authored by Douglas Rice at Douglas Rice's Homepage, Added: Jan 7, 2007

Unsorted Pool