Parallax BASIC Stamp 2e Programming Manual page 279

Table of Contents

Advertisement

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.
5: BASIC Stamp Command Reference – SERIN
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)
Step 2: Set data bits
and parity (bit 13)
Step 3: Select
polarity (bit 14)
Baud
8-bit
Rate
no-parity
inverted
300
19697
600
18030
1200
17197
2400
16780
4800*
16572
9600*
16468
*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
8-bit
Rate
no-parity
inverted
1200
18447
2400
17405
4800
16884
9600*
16624
*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
8-bit
Rate
no-parity
inverted
1200
18447
2400
17405
4800
16884
9600*
16624
*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.
BASIC Stamp Programming Manual 2.0c • www.parallaxinc.com • Page 277
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.
8-bit/no-parity
=
0
7-bit/even-parity
=
8192
True (noninverted) =
0
Inverted
=
16384
8-bit
no-parity
even-parity
true
inverted
3313
1646
813
396
188
84
8-bit
no-parity
even-parity
true
inverted
2063
1021
500
240
8-bit
no-parity
even-parity
true
inverted
2063
1021
500
240
7-bit
7-bit
even-parity
true
27889
11505
26222
9838
25389
9005
24972
8588
24764
8380
24660
8276
7-bit
7-bit
even-parity
true
26639
10255
25597
9213
25076
8692
24816
8432
7-bit
7-bit
even-parity
true
26639
10255
25597
9213
25076
8692
24816
8432

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the BASIC Stamp 2e and is the answer not in the manual?

Table of Contents