MS51
Dec. 17, 2019
Page
240
of 316
Rev 1.01
M
S51
SE
RIES
TE
CHNICA
L REF
ERE
N
CE MA
NU
A
L
RH3 = value high byte
RL3 = value low byte
T3CON|= 0x08;
Following list some popular baudrate value base on different Fsys and the deviation value:
Fsys Value
Baud Rate
TH1 Value (Hex)
RH3,RL3 Value (Hex)
Baudrate Deviation
24MHz
4800
64
(SMOD=0)
FEC8
0.160256%
9600
64
FF64
0.160256%
19200
B2
FFB2
0.160256%
38400
D9
FFD9
0.160256%
57600
E6
FFE6
0.160256%
115200
F3
FFF3
0.160256%
150000
F6
FFF6
0.000000%
166666
F7
FFF7
0.000400%
187500
F8
FFF8
0.000000%
214285
F9
FFF9
0.000333%
250000
FA
FFFA
0.000000%
300000
FB
FFFB
0.000000%
375000
FC
FFFC
0.000000%
500000
FD
FFFD
0.000000%
750000
FE
FFFE
0.000000%
1500000
FF
FFFF
0.000000%
16MHz
4800
30
FF30
0.160256%
9600
98
FF98
0.160256%
19200
CC
FFCC
0.160256%
38400
E6
FFE6
0.160256%
57600
EF
FFEF
2.124183%
115200
F7
FFF7
-3.549383%
200000
FB
FFFB
0.000000%
250000
FC
FFFC
0.000000%
333333
FD
FFFD
0.000100%
500000
FE
FFFE
0.000000%
1000000
FF
FFFF
0.000000%
6.8.3
Framing Error Detection
Framing error detection is provided for asynchronous modes. (Mode 1, 2, or 3.) The framing error
occurs when a valid stop bit is not detected due to the bus noise or contention. The UART can detect
a framing error and notify the software.
The framing error bit, FE, is located in SCON.7. This bit normally serves as SM0. While the framing
error accessing enable bit SMOD0 (PCON.6) is set 1, it serves as FE flag. Actually, SM0 and FE
locate in different registers.