Weared Variables In Debug !!HELP!!
Hi I Have The BS2 Kit Found At: http://parallax.com/Store/Microcontrollers/BASICStampProgrammingKits/tabid/136/CategoryID/11/List/0/SortField/0/Level/a/ProductID/294/Default.aspx
I Need Help With This Code:
' {$STAMP BS2}
' {$PBASIC 2.5}
a······ VAR······ Word(8)
OUTPUT 5
beginsetup:
a = 0
Main:
· a = a + 1
· HIGH 5
· PAUSE 500
· LOW·5
· PAUSE 150
· HIGH·5
· PAUSE 150
· LOW·5
· PAUSE 150
· HIGH·5
· PAUSE 150
· LOW·5
· PAUSE 150
· IF (a = 11) THEN
··· DEBUG CLS
··· GOTO beginsetup
· ELSE
··· GOTO Sub
· ENDIF
· Sub:
··· DEBUG a, " Loop Completed", CR
··· GOTO Main
But the result is NOT RIGHT
Here It Is:
·Loop Completed
······························· oop Completed
Loop Completed
·Loop Completedd
·Loop Completed
······························· oop Completed
Loop Completed
·Loop Completedd
·Loop Completed
·Loop Completed
Loop Completed
········ Loop Completed
·Loop Completed
I Remember That At One Point·It·Replaced One Line The previous Loop Created
My computer Is I Think Confused With the Incoming Data
I Have Tried The Driver Troubleshooters, But May Not Have Done Them Correctly
!!!!HELP!!!HELP!!!HELP!!!!
I Need Help With This Code:
' {$STAMP BS2}
' {$PBASIC 2.5}
a······ VAR······ Word(8)
OUTPUT 5
beginsetup:
a = 0
Main:
· a = a + 1
· HIGH 5
· PAUSE 500
· LOW·5
· PAUSE 150
· HIGH·5
· PAUSE 150
· LOW·5
· PAUSE 150
· HIGH·5
· PAUSE 150
· LOW·5
· PAUSE 150
· IF (a = 11) THEN
··· DEBUG CLS
··· GOTO beginsetup
· ELSE
··· GOTO Sub
· ENDIF
· Sub:
··· DEBUG a, " Loop Completed", CR
··· GOTO Main
But the result is NOT RIGHT
Here It Is:
·Loop Completed
······························· oop Completed
Loop Completed
·Loop Completedd
·Loop Completed
······························· oop Completed
Loop Completed
·Loop Completedd
·Loop Completed
·Loop Completed
Loop Completed
········ Loop Completed
·Loop Completed
I Remember That At One Point·It·Replaced One Line The previous Loop Created
My computer Is I Think Confused With the Incoming Data
I Have Tried The Driver Troubleshooters, But May Not Have Done Them Correctly
!!!!HELP!!!HELP!!!HELP!!!!
Comments
· Sub:
··· DEBUG DEC a, " Loop Completed", CR
··· GOTO Main
Main:
W VAR Word
Q DATA "Hi"
READ Q, W
DEBUG w, CR
Where do I go for more info.