Hi, new to this forum and to PIC's in general. I fly RC and have used a 12F683 to act as failsafe system for 3 servos.
I've tried the pulsout command but the output just goes HI?? (I have scope to check).
Here is the code:
pos var byte ' Define our storage location for the servo position information.
servo var byte ' Define our storage location for the servo number to move.
cont var byte ' Define a variable to hold the count.
' 4 mhz clock internal
' 500 = 1 ms
' 1000 = 2 ms
' 1250 = 2.5 ms
pos = 1250
start:
for cont = 0 to 50
pulsout portb.4,pos ' Send servo# ? to position ?.
pause 20 ' Wait 20 ms.
next cont ' Next pulse.
goto start ' Return to get more serial input.
Can anyone help??
Bookmarks