In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Sparks-R-Fun wrote: I am experiencing unexpected results with the functioning of the timeout variable as part of the SX/B "SerIn" command. The following information is given in the help file. [quote="SX/B Help File"]SERIN Pin, BaudMode, ByteVar {, Timeout, ToLabel} Timeout is an optional byte or word variable/constant that tells SERIN how long to wait (in milliseconds) for incoming data. If data does not arrive in time, the program will jump to the address specified by ToLabel. [/QUOTE] When I specify a timeout value of 10ms directly like this: [CODE]serin SIn, T9600, Temp1, 10, SerialDataPaused[/CODE] it seems to work as expected with a quick jump to SerialDataPaused when no serial data is received. However, when I try to accomplish the same thing in this manner: [CODE]tmpW1 Var Word tmpW1 = 10 serin SIn, T9600, Temp1, tmpW1, SerialDataPaused [/CODE] the jump to SerialDataPaused when no data is received does not occur for well over a minute! =O It seems to me that both methods should produce nearly similar results. What am I missing? Have I overlooked something obvious in regard to the use of a variable? - Sparks ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=156640 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2006 (http://www.dotNetBB.com)