SolidWorksMagi
Senior Member
The program listing;
Here are the images from my DSO nano;
Looks like the actual output is more like 2700µs instead of 2000µ
Is this caused by the PICAXE 28X2 chips internal clock?
Code:
; 28X2+TIC+RC+StepperMotor.bas
#picaxe 28X2 ; Identify the chip being used
; Begin Declare Variables and Constants * * * * * * * * * * * * * * *
symbol StepperMotor = B.0
symbol i = b0
; BEGIN Initialization * * * * * * * * * * * * * * *
; hserout pin = C.6 = PIN 11
hsersetup B9600_8, %00000 ; 9600 baud, non-inverted polarity
; END Initialization * * * * * * * * * * * * * * * *
; BEGIN Main Body * * * * * * * * * * * * * * *
do
gosub Left1
gosub STOPP
pause 1000
gosub Right1
gosub STOPP
pause 1000
loop
; END Main Body * * * * * * * * * * * * * * * *
end
; BEGIN Subroutines * * * * * * * * * * * * * * *
; BEGIN Motor Subroutines * * * * * * * * * * * * * * *
STOPP:
for i = 0 to 10
pulsout B.0,150
;servopos B.0,150
pause 20
next i
return
Left1:
for i = 0 to 100
pulsout StepperMotor,200
pause 20
next i
return
Right1:
pulsout StepperMotor,140
return
; END Motor Subroutines * * * * * * * * * * * * * * * *
; END Subroutines * * * * * * * * * * * * * * * *
end
Looks like the actual output is more like 2700µs instead of 2000µ
Is this caused by the PICAXE 28X2 chips internal clock?