Hi there,
I was wondering if anyone knew of an issue with the BASIC 'lookup' command in the program compiler. I have been trying to simulate driving a Unipolar stepper motor using a PICAXE 08 and L293 chip. The program is listed below. The Picaxe 08 doesn't seem to be operating correctly - i.e the output are not being set after the lookup command selects them from the list of Hex numbers. The program simulates perfectly well using Picaxe programming editor, but seems to fall down using VSM.
Any help would be greatly appreciated.
thanks.
symbol singlestep = 4
symbol halfstep = 8
symbol delay = 1000
symbol stepcount = b0
symbol counter = b1
output 1
output 2
output 4
do
for counter = 1 to 20 'single step forward
for stepcount = 1 to singlestep
lookup stepcount, (0,$01,$02,$04,$10), pins
pause delay
next stepcount
next counter
pause 2000
.....
I was wondering if anyone knew of an issue with the BASIC 'lookup' command in the program compiler. I have been trying to simulate driving a Unipolar stepper motor using a PICAXE 08 and L293 chip. The program is listed below. The Picaxe 08 doesn't seem to be operating correctly - i.e the output are not being set after the lookup command selects them from the list of Hex numbers. The program simulates perfectly well using Picaxe programming editor, but seems to fall down using VSM.
Any help would be greatly appreciated.
thanks.
symbol singlestep = 4
symbol halfstep = 8
symbol delay = 1000
symbol stepcount = b0
symbol counter = b1
output 1
output 2
output 4
do
for counter = 1 to 20 'single step forward
for stepcount = 1 to singlestep
lookup stepcount, (0,$01,$02,$04,$10), pins
pause delay
next stepcount
next counter
pause 2000
.....
Last edited: