That is exactly what I meant.
All I need now is for some one to help me with my little problem.
Cheers
That is exactly what I meant.
All I need now is for some one to help me with my little problem.
Cheers
Pattern: var byte ' hold the pattern for PortB
Gen0: var byte ' general purpose reg
ChasePattern: data 129, 66, 36, 24, 36, 66,129, -1
OutPattern:
Gen0 = ChasePattern ' Gen0 is a pointer to the pattern
while 1 ' forever
read Gen0, Pattern
if Pattern = -1 then ' this is the end marker,
goto OutPattern ' see it, start over
else
PortB = Pattern
endif
wend
Mind you, you need to configure PortB as outputs etc. which I havent done for you.
Sorry I cannot find how to format the code even though I have done it earlier.
Jerson
Jerson,
Thanks for replying. I started a new thread last night and have a similar suggestion from Steve using for next loops, but I'll also try your suggestion of using the while and wend commands and adding an end of line marker such as -1 (its all go practice)
Bookmarks