5: BASIC Stamp Command Reference – SERIN
BASIC Stamp Programming Manual 2.0c
•
www.parallaxinc.com
•
Page 273
SERIN
BS1 BS2 BS2e BS2sx BS2p
SERIN
Rpin, Baudmode, { (Qualifier),} {#} InputData
SERIN
Rpin {\Fpin}, Baudmode, {Plabel,} {Timeout, Tlabel,} [ InputData ]
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. Multiple
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
1
2
e
2
sx
2
p
2
1
NOTE: Expressions are not
allowed as arguments on the BS1.
The range of the Rpin argument on
the BS1 is 0 – 7.
NOTE: The BS1's InputData
argument can only be a list of
variables and the optional decimal
modifier (#).
1
Summary of Contents for BASIC Stamp 2e
Page 1: ...BASIC Stamp Programming Manual Version 2 0c...
Page 34: ...Quick Start Guide Page 32 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Page 340: ...ASCII Chart Page 338 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Page 342: ...Reserved Words Page 340 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Page 346: ...Conversion Formatters Page 344 BASIC Stamp Programming Manual 2 0b www parallaxinc com...