Thread: PBASIC Syntax
View Single Post
  #8   Spotlight this post!  
Unread 14-01-2003, 16:58
rbayer's Avatar Unsung FIRST Hero
rbayer rbayer is offline
Blood, Sweat, and Code
no team (Teamless Orphan)
 
Join Date: Mar 2002
Rookie Year: 2001
Location: Minnetonka, MN
Posts: 1,087
rbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of light
Send a message via AIM to rbayer
Quote:
Originally posted by Ian W.
the two 255's indicate the beginning of a new serout. i learned that the hard way . don't be stupid like me, make sure no 255's come in sequence after the initial ones . i also think the uP may put a 127/0 to any unused outputs, but don't count me on this one, cause i'm not 100% sure.
You are correct.

You CAN remove stuff from the SEROUT. You CANNOT remove stuff from the serin or you will get BASIC INIT errors.

As for the gosub, it is possible, but takes some reworking of the other parts of the code. You main loop would have to be:

Do
gosub mySerin

'normal code goes here, including your loop that you posted originally.

gosub mySerout
Loop

mySerin:
Serin ...
return

mySerout:
Serout ...
return
__________________
New C-based RoboEmu2 (code simulator) available at: http://www.robbayer.com/software.php