triton82354
Member
Been working with 125G EXI Servo B1228 but to its limitations have switch to bipolar steppers...Using the experimenter board 28x2 chip along with motor driver L293D<ordered today from :http://www.hvwtech.com/products_view.asp?ProductID=341>
Unable to test the following code until driver arrives
Trying to move the stepper manual from right to left 1 step at a time
Do you guys and gals think it will work
Unable to test the following code until driver arrives
Trying to move the stepper manual from right to left 1 step at a time
Code:
main: ‘ make a label called ‘main’
if pinc.7 = 1 then manualmove ‘ jump if the input is on
goto main ‘ else loop back around
manualmove: 'make a label called manualmove'
pause 100 ‘short delay
if pinc.4 = 1 then moveleft ‘ jump if the input is on
if pinc.3 = 1 then moveright ‘ jump if the input is on
if pinc.2 = 1 then main ‘ jump if the input is on
goto manualmove ‘ else loop back around
moveleft: 'make a label called moveleft
pause 100 ‘short delay
gosub lstep ‘ call left step sub-procedure
lstep: let b1 = b1 + 1
goto step2 ‘ goto the lookup table
step2: let b1 = b1 & %00000011 ‘ mask lower two bits of b1
goto manualmove
moveright: 'make a lael called moveright
pause 100 ‘short delay
gosub rstep ‘ call left step sub-procedure
rstep: let b1 = b1 - 1
goto step3 ‘ goto the lookup table
step3: let b1 = b1 & %00000011 ‘ mask lower two bits of b1
goto manualmove
Last edited: