Hi Acetronics,
first of all, thanks a lot for the help as well.
On the code you have reset the PORTB but you make it all 0, why do we reset the port?
Code:
PORTB = 0 'Reset PortB to be sure
And then at the bottom you used the PULSEOUT command. What is the different between the following codes?
Code:
MoveMotor:
For i = 0 to (StepCount - 1)
Gosub StepIt
PauseUs Delay
NEXT
RETURN
StepIt:
Step_Pin = 1 ' Generate a 10us wide pulse on the step pin.
PauseUs 10
Step_Pin = 0
RETURN
and this one?
Code:
MoveMotor:
For i = 0 to (StepCount - 1)
PULSOUT Step_Pin, 1 'Gosub StepIt
PauseUs Delay
NEXT
RETURN
StepIt:
Step_Pin = 1 ' Generate a 10us wide pulse on the step pin.
PauseUs 10
Step_Pin = 0
RETURN
Bookmarks