Specifications
BASIC Stamp II
Page 318 • BASIC Stamp Programming Manual 1.8 • Parallax, Inc.
Serout
SEROUT
tpin,baudmode,{pace,}[outputData]
SEROUT
tpin\fpin,baudmode,{timeout,tlabel,}[outputData]
Transmit asynchronous (e.g., RS-232) data.
•
Tpin
is a variable/constant (0–16) that specifies the I/O pin
through which the serial data will be sent. This pin will switch to
output mode and will remain in that state after the instruction is
completed. If Tpin is set to 16, the Stamp uses the dedicated serial-
output pin (SOUT), normally used by the STAMP2 host program.
•
Baudmode
is a 16-bit variable/constant that specifies serial
timing and configuration. The lower 13 bits are interpreted as the
bit period minus 20µs. Bit 13 ($2000 hex) is a flag that controls the
number of data bits and parity (0=8 bits and no parity, 1=7 bits
and even parity). Bit 14 ($4000 hex) controls the bit polarity
(0=noninverted, 1=inverted). Bit 15 ($8000 hex) determines
whether the pin is driven to both states (0/1) or to one state and
open in the other (0=both driven, 1=open).
•
Pace
is an optional variable/constant (0–65535) that tells Serout
how long in milliseconds it should pause between transmitting
bytes.
•
OutputData
is a list of variables, constants and modifiers that
tells Serout how to format outgoing data. Serout can transmit
individual or repeating bytes; convert values into decimal, hex or
binary text representations; or transmit strings of bytes from
variable arrays.
•
Fpin
is an optional variable/constant (0–15) that specifies the
I/O pin to be used for flow control (byte-by-byte handshaking).
This pin will switch to input mode and remain in that state after
the instruction is completed.
•
Timeout
is an optional variable/constant (0–65535) used in
conjunction with fpin flow control. Timeout tells Serout how long
in milliseconds to wait for fpin permission to send. If permission
does not arrive in time, the program will continue at tlabel.
•
Tlabel
is an optional label used with fpin flow control and timeout.










