hi thanks for looking in, im looking at a servo controller at the moment that just moves left to right with a 16F84
sorry for being thick but what type of PIC language is this? as it looks very different from the LED programs i have seen
Also do i not need to set header and the equates or do i not need it in this case. Any help of what i would need to add to this program to get it running would be much appreciated. sorry i am very new to this
this is what i have to work with
----Listing 1----
' First servomotor program
' Sweeps left to right, then reverses
Symbol B1 = pw ' create a variable pw
pw = 100 ' start at extreme left
sweep: pulsout 0,pw ' send pulse to motor
pause 18 ' set frequency to about 50 Hz
pw = pw + 1 ' increase pw by 1
if pw > 200 then back ' at extreme right, turn CCW
goto sweep ' otherwise, continue
back: pulsout 0,pw ' send pulse to motor
pause 18 ' set frequency to about 50 Hz
pw = pw - 1 ' decrease pw by 1
if pw < 100 then sweep ' at extreme left, turn CW
goto back ' otherwise, continue
----End of Listing 1----
what lines if any do i need to add?
would MPLAB be suitable?
thanks again
thanks for your time
sorry for being thick but what type of PIC language is this? as it looks very different from the LED programs i have seen
Also do i not need to set header and the equates or do i not need it in this case. Any help of what i would need to add to this program to get it running would be much appreciated. sorry i am very new to this
this is what i have to work with
----Listing 1----
' First servomotor program
' Sweeps left to right, then reverses
Symbol B1 = pw ' create a variable pw
pw = 100 ' start at extreme left
sweep: pulsout 0,pw ' send pulse to motor
pause 18 ' set frequency to about 50 Hz
pw = pw + 1 ' increase pw by 1
if pw > 200 then back ' at extreme right, turn CCW
goto sweep ' otherwise, continue
back: pulsout 0,pw ' send pulse to motor
pause 18 ' set frequency to about 50 Hz
pw = pw - 1 ' decrease pw by 1
if pw < 100 then sweep ' at extreme left, turn CW
goto back ' otherwise, continue
----End of Listing 1----
what lines if any do i need to add?
would MPLAB be suitable?
thanks again
thanks for your time