2
2
e
1
NOTE: Expressions are not
allowed as arguments on the BS1.
The range of the Rpin argument on
the BS1 is 0 – 7.
1
NOTE: The BS1's InputData
argument can only be a list of
variables and the optional decimal
modifier (#).
5: BASIC Stamp Command Reference – SERIN
SERIN
1
SERIN Rpin, Baudmode, { (Qualifier),} {#} InputData
2
2
SERIN Rpin {\Fpin}, Baudmode, {Plabel,} {Timeout, Tlabel,} [ InputData ]
sx
p
Function
Receive asynchronous serial data (e.g., RS-232 data).
• Rpin is a variable/constant/expression (0 – 16) that specifies the I/O
pin through which the serial data will be received. This pin will be
set to input mode. On the BS2, BS2e, BS2sx and BS2p, if Rpin is set to
16, the BASIC Stamp uses the dedicated serial-input pin (SIN,
physical pin 2), which is normally used by the Stamp Editor during
the download process.
• Fpin is an optional variable/constant/expression (0 – 15) that
specifies the I/O pin to indicate flow control status on. This pin will
be set to output mode.
• Baudmode is variable/constant/expression (0 – 7 on the BS1, 0 –
65535 on all other BASIC Stamps) that specifies serial timing and
configuration.
• Qualifier is an optional variable/constant (0 – 255) indicating data
that must be received before execution can continue.
qualifiers can be indicated with commas separating them.
• Plabel is an optional label indicating where the program should go
in the event of a parity error. This argument should only be
provided if Baudmode indicates 7 bits, and even parity.
• Timeout is an optional variable/constant/expression (0 – 65535) that
tells SERIN how long to wait for incoming data. If data does not
arrive in time, the program will jump to the address specified by
Tlable.
• Tlabel is an optional label that must be provided along with Timeout,
indicating where the program should go in the event that data does
not arrive within the period specified by Timeout.
• InputData is list of variables and formatters that tells SERIN what to
do with incoming data. SERIN can store data in a variable or array,
interpret numeric text (decimal, binary, or hex) and store the
BS1
BS2
BS2e BS2sx BS2p
BASIC Stamp Programming Manual 2.0c • www.parallaxinc.com • Page 273
Multiple
Need help?
Do you have a question about the BASIC Stamp 2e and is the answer not in the manual?