5: BASIC Stamp Command Reference – SERIN
BASIC Stamp Programming Manual 2.0c
•
www.parallaxinc.com
•
Page 291
data you receive is unreadable, it is most likely a baud
rate setting error.
5. If receiving data from another device that is not a BASIC Stamp,
try to use baud rates of 4800 and below.
a. Because of additional overhead in the BASIC Stamp, and
the fact that the BASIC Stamp has no hardware receive
buffer for serial communication, received data may
sometimes be missed or garbled. If this occurs, try
lowering the baud rate (if possible), adding extra stop bits,
and not using formatters in the SERIN command. Using
simple variables (not arrays) and no formatters will
increase the chance that the BASIC Stamp can receive the
data properly.
6. Be sure to study the effects of SERIN formatters.
a. Some formatters have specific requirements that may
cause problems in received data. For example, the DEC
formatter requires a non-decimal-numeric character to
follow the received number before it will allow the BASIC
Stamp to continue. See Appendix C for example input
data and the effects on formatters.
Demo Program (SERIN.bas)
' This program waits for the characters "A", "B", "C" and "D" to arrive serially
' (Inverted 2400 baud, N81) on I/O pin 0, followed by a number and a carriage return
' (or some other non-number). It then displays the received number on the DEBUG screen.
'{$STAMP BS1} 'STAMP directive (specifies a BS1)
SYMBOL Result = W0
Loop:
SERIN 0, N2400, ("ABCD"), #Result
DEBUG #Result, CR
GOTO Loop
1
Содержание BASIC Stamp 1
Страница 1: ...BASIC Stamp Programming Manual Version 2 0c...
Страница 30: ...Introduction to the BASIC Stamps Page 28 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 34: ...Quick Start Guide Page 32 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 90: ...BUTTON BASIC Stamp Command Reference Page 88 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 118: ...END BASIC Stamp Command Reference Page 116 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 128: ...FREQOUT BASIC Stamp Command Reference Page 126 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 196: ...NAP BASIC Stamp Command Reference Page 194 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 206: ...OWIN BASIC Stamp Command Reference Page 204 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 214: ...OWOUT BASIC Stamp Command Reference Page 212 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 216: ...PAUSE BASIC Stamp Command Reference Page 214 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 226: ...POLLMODE BASIC Stamp Command Reference Page 224 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 232: ...POLLOUT BASIC Stamp Command Reference Page 230 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 236: ...POLLRUN BASIC Stamp Command Reference Page 234 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 240: ...POLLWAIT BASIC Stamp Command Reference Page 238 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 262: ...RCTIME BASIC Stamp Command Reference Page 260 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 274: ...RUN BASIC Stamp Command Reference Page 272 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 310: ...SEROUT BASIC Stamp Command Reference Page 308 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 324: ...STOP BASIC Stamp Command Reference Page 322 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 340: ...ASCII Chart Page 338 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 342: ...Reserved Words Page 340 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 346: ...Conversion Formatters Page 344 BASIC Stamp Programming Manual 2 0b www parallaxinc com...