5: BASIC Stamp Command Reference – SERIN
BASIC Stamp Programming Manual 2.0c
•
www.parallaxinc.com
•
Page 277
shows how Baudmode is calculated and Tables 5.73, 5.74 and 5.75 show
common baud modes for standard serial baud rates.
Step 1: Determine the
bit period
(bits 0 – 11)
BS2 and BS2e: = INT(1,000,000 / baud rate) – 20
BS2sx: = INT(2,500,000 / baud rate) – 20
BS2p: = INT(2,500,000 / baud rate) – 20
Note: INT means 'convert to integer;' drop the numbers to the right of the
decimal point.
Step 2: Set data bits
and parity (bit 13)
8-bit/no-parity = 0
7-bit/even-parity = 8192
Step 3: Select
polarity (bit 14)
True (noninverted) = 0
Inverted = 16384
Baud
Rate
8-bit
no-parity
inverted
8-bit
no-parity
true
7-bit
even-parity
inverted
7-bit
even-parity
true
300
19697
3313
27889
11505
600
18030
1646
26222
9838
1200
17197
813
25389
9005
2400
16780
396
24972
8588
4800*
16572
188
24764
8380
9600*
16468
84
24660
8276
*The BASIC Stamp 2 and BASIC Stamp 2e may have trouble synchronizing with the
incoming serial stream at this rate and higher due to the lack of a hardware input buffer. Use
only simple variables and no formatters to try to solve this problem.
Baud
Rate
8-bit
no-parity
inverted
8-bit
no-parity
true
7-bit
even-parity
inverted
7-bit
even-parity
true
1200
18447
2063
26639
10255
2400
17405
1021
25597
9213
4800
16884
500
25076
8692
9600*
16624
240
24816
8432
*The BASIC Stamp 2sx may have trouble synchronizing with the incoming serial stream at
this rate and higher due to the lack of a hardware input buffer. Use only simple variables and
no formatters to try to solve this problem.
Baud
Rate
8-bit
no-parity
inverted
8-bit
no-parity
true
7-bit
even-parity
inverted
7-bit
even-parity
true
1200
18447
2063
26639
10255
2400
17405
1021
25597
9213
4800
16884
500
25076
8692
9600*
16624
240
24816
8432
*The BASIC Stamp 2p may have trouble synchronizing with the incoming serial stream at this
rate and higher due to the lack of a hardware input buffer. Use only simple variables and no
formatters to try to solve this problem.
Table 5.72: BS2, BS2e, BS2sx and
BS2p Baudmode calculation. Add
the results of steps 1, 2 and 3 to
determine the proper value for the
Baudmode argument.
Table 5.73: BS2 and BS2e
common baud rates and
corresponding Baudmodes.
Table 5.74: BS2sx common baud
rates and corresponding
Baudmodes.
Table 5.75: BS2p common baud
rates and corresponding
Baudmodes.
Содержание 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...