beginners help with a simple program (on a 16f690 or 12f863)
Posted: Wed Oct 16, 2019 5:36 pm
Hi
Haven't touched a pic in nearly ten years and and was only and amateur back then, have forgotten everything.
Trying to make simple control program for a step motor. (making this https://www.thingiverse.com/thing:159981)
basically just a running light program with adjustable speed, something like
gp0 analog in ; for adjusting speed
gp1 to 4 digital out
gp1 to 4 = 1 ; 1 low, 0 high
main
gp4 0
gp1 1
goto wait
gp1 0
gp2 1
goto wait
gp2 0
gp3 1
goto wait
gp3 0
gp4 1
goto wait
goto main
wait
read gp0
set wait time
sleep
return
Can anyone direct me to some sample code or similar program with comments an amateur can understand? or if someone wants to throw together something basic i can build on? (using mplab 8.92 and pic kit 2 with demo board)
Haven't touched a pic in nearly ten years and and was only and amateur back then, have forgotten everything.
Trying to make simple control program for a step motor. (making this https://www.thingiverse.com/thing:159981)
basically just a running light program with adjustable speed, something like
gp0 analog in ; for adjusting speed
gp1 to 4 digital out
gp1 to 4 = 1 ; 1 low, 0 high
main
gp4 0
gp1 1
goto wait
gp1 0
gp2 1
goto wait
gp2 0
gp3 1
goto wait
gp3 0
gp4 1
goto wait
goto main
wait
read gp0
set wait time
sleep
return
Can anyone direct me to some sample code or similar program with comments an amateur can understand? or if someone wants to throw together something basic i can build on? (using mplab 8.92 and pic kit 2 with demo board)