BASIC stamp manual v2.2

5: BASIC Stamp Command Reference – SEROUT
BASIC Stamp Syntax and Reference Manual 2.2 www.parallax.com Page 419
Table 5.107: BS2, BS2e and BS2pe
common baud rates and
corresponding Baudmodes.
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
NOTE: For "open" baudmodes used in networking, add 32768 to the values from the table
above. If the dedicated serial port (Tpin=16) is used, the data is inverted and driven
regardless of the baudmode setting.
Table 5.108: BS2sx and BS2p
common baud rates and
corresponding Baudmodes.
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
NOTE: For "open" baudmodes used in networking, add 32768 to the values from the table
above. If the dedicated serial port (Tpin=16) is used, the data is inverted and driven
regardless of the baudmode setting.
Table 5.109: BS2px common
baud rates and corresponding
Baudmodes.
Baud
Rate
8-bit
no-parity
inverted
8-bit
no-parity
true
7-bit
even-parity
inverted
7-bit
even-parity
true
1200 19697 3313 27889 11505
2400 18030 1646 26222 9838
4800 17197 813 25389 9005
9600 16780 396 24792 8588
If you’re communicating with existing software or hardware, its speed(s)
and mode(s) will determine your choice of baud rate and mode. See the
SERIN command description for more information.
The example below will transmit a single byte through I/O pin 1 at 2400
baud, 8N1, inverted:
SEROUT 1, N2400, (65)
--or--
SEROUT 1, 16780, [65]
C
HOOSING THE PROPER BAUD MODE.
A
SIMPLE FORM OF SEROUT.
1
All
2
This is written with the BS2's Baudmode
value. Be sure to adjust the value for
y
our BASIC Stam
p
model.