Hello,
I am using a pic 16f84a and a stepper motor to make full rotation. I did the following program to make sure that the stepper motor is working and it does (turning continuously without stopping)
.
Now I want the stepper motor to stop for 5s after a full turn, then do another turn, stop for another 5s continuously.
Can someone help me fix that problem?
Below is my program for the continuous turn.
'PICBasic Stepper Motor Controller Program
Symbol TRISB = 134 'Initialize TRISB to 134
Symbol PortB = 6 'Initialize Port B to 6
symbol ti = b6 'Initial ti delay
ti = 25 'Set delay to 25 ms
Poke TRISB,0 'Set Port B lines output
start:'Forward rotation sequence
poke portb,1 'Step 1
pause ti 'Delay
poke portb,2 'Step 2
pause ti 'Delay
poke portb,4 'Step 3
pause ti 'Delay
poke portb,8 'Step 4
pause ti 'Delay
goto start 'Do again
Thank you
Alima
I am using a pic 16f84a and a stepper motor to make full rotation. I did the following program to make sure that the stepper motor is working and it does (turning continuously without stopping)
.
Now I want the stepper motor to stop for 5s after a full turn, then do another turn, stop for another 5s continuously.
Can someone help me fix that problem?
Below is my program for the continuous turn.
'PICBasic Stepper Motor Controller Program
Symbol TRISB = 134 'Initialize TRISB to 134
Symbol PortB = 6 'Initialize Port B to 6
symbol ti = b6 'Initial ti delay
ti = 25 'Set delay to 25 ms
Poke TRISB,0 'Set Port B lines output
start:'Forward rotation sequence
poke portb,1 'Step 1
pause ti 'Delay
poke portb,2 'Step 2
pause ti 'Delay
poke portb,4 'Step 3
pause ti 'Delay
poke portb,8 'Step 4
pause ti 'Delay
goto start 'Do again
Thank you
Alima