Second PIC program, this one moves a hobby servo motor to one of two positions. The switch needs to be pulled up with a resistor.
It has one light that is always on and a second that switches on/off when the servo moves.
PIC12F683 servo motor movie:
Assembly of the .asm to a .hex:
Write it to the PIC12 using:
wine “C:\Program Files\PICPgm\WinPICPgm.exe”
It is wired as shown in the video.
The servo timing is off from what I calculated. A calculated 1ms to 2ms gave about 60 degrees of movement, what’s shown is 0.75 to 1.25 ms pulses every 20 ms. I haven’t measured the pulse lengths with a scope.