BS2 Do Loop Only Executed Once
fake_backflip
Posts: 3
in BASIC Stamp
My Basic Stamp 2 only executes a do loop once. This problem is mentioned in the Whats a Microcontroller PDF, and gives some instructions as to what to do next.
I am using the debug statement, however, the program still halts after 5 seconds. Here is my code.
I am using Windows 7 on a Dell Latitude 2120 netbook. I've used other netbooks without a problem in the past. Please tell if I am following the instructions correctly. Does anyone have suggestions about what to do next?
Although it’s not common, there are some computer systems, such as certain laptops and
docking stations, that will halt the PBASIC program after the first time through a
DO...LOOP. These computers have a non-standard serial port design. By placing a DEBUG
command in the program LedOnOff.bs2, the open Debug Terminal prevents this from
possibly happening
docking stations, that will halt the PBASIC program after the first time through a
DO...LOOP. These computers have a non-standard serial port design. By placing a DEBUG
command in the program LedOnOff.bs2, the open Debug Terminal prevents this from
possibly happening
I am using the debug statement, however, the program still halts after 5 seconds. Here is my code.
' {$STAMP BS2}
DEBUG "Debug Statement Used To Stop Halt"
Main:
OUTPUT 0
OUTPUT 1
OUTPUT 2
OUTPUT 3
OUTPUT 4
OUTPUT 5
DEBUG "Outputs enabled"
DO
LOW 0
HIGH 3
HIGH 1
LOW 1
HIGH 4
LOW 4
HIGH 2
LOW 2
HIGH 5
LOW 5
LOOP
PAUSE 5000
DEBUG "program ends"
DEBUG "Debug Statement Used To Stop Halt"
Main:
OUTPUT 0
OUTPUT 1
OUTPUT 2
OUTPUT 3
OUTPUT 4
OUTPUT 5
DEBUG "Outputs enabled"
DO
LOW 0
HIGH 3
HIGH 1
LOW 1
HIGH 4
LOW 4
HIGH 2
LOW 2
HIGH 5
LOW 5
LOOP
PAUSE 5000
DEBUG "program ends"
I am using Windows 7 on a Dell Latitude 2120 netbook. I've used other netbooks without a problem in the past. Please tell if I am following the instructions correctly. Does anyone have suggestions about what to do next?
Comments
'{$STAMP BS2}
'{$PBASIC 2.5}
DEBUG "The LED connected to ... is blinking!"
DO
HIGH 11
LOW 6
PAUSE 500
LOOP
Works fine.. Is there a problem with using the Main: label?