PIC servo pot controlled
Third PIC program, this one moves a hobby servo motor using a 10kΩ pot. The pot is read using the A/D converter function on the PIC. The four high bits of the value are used to control the servo to sixteen positions over its range. Two more bits could easily be added to give finer control.
It has a light that flips on/off with each jump of the servo, another light that is always on and a third that switches the servo on/off.
PIC12F683 servo motor movie:
Here are the code files: p12_servo2.asm and p12_servo2.hex.
It is wired as shown in the video.