I know when I was in school, they always made us flow chart out the process first. Would you be able to do something like that for us, because honestly, I'm a little confused by your program.
some examples...

Originally Posted by
AlaskanEE
INCLUDE "modedefs.bas"
DEFINE OSC 20
INPUTDATA var byte
X VAR BYTE
X = 0
MAIN:
PORTB.5 = 0
SEROUT PORTB.1,T9600,[1]
WAITLOOP:
SERIN PORTA.1,T9600,[inputdata]
if inputdata <> "A" then goto waitloop
LOOP:
IF (X<4) THEN
HIGH PORTB.5
PAUSE 2
LOW PORTB.2
PAUSE 2
X = X+1
GOTO LOOP
endif
goto MAIN

Originally Posted by
AlaskanEE
SERIN PORTA.1,T9600,[inputdata]
Code:
'What is the value of inputdata the first time this runs? If you are using "A" for a qualifier, the statement should be
SERIN PORTA.1,T9600,["A"],inputdata
'This statement will wait for until "A" comes in, then puts data after that into variable inputdata

Originally Posted by
AlaskanEE
IF (X<4) THEN
Code:
'I usually write
IF X<4 THEN
Did you ever get your hands on a PBP manual?
Bookmarks