Baud rate selection (modes 1 and 3) – Rainbow Electronics AT89C5122 User Manual
Page 133

133
AT8xC5122/23
4202E–SCR–06/06
Baud Rate Selection
(Modes 1 and 3)
In modes 1 and 3, the Baud Rate is derived either from the Timer 1 or the Internal Baud
Rate Generator and allows different baud rate in reception and transmission.
As shown in Figure 79 the selection is done using RBCK and TBCK bits in BDRCON
register.
Figure 80 gives the baud rate calculation formulas for each baud rate source while
Table 76 details Internal Baud Rate Generator configuration for different peripheral
clock frequencies and giving baud rates closer to the standard baud rates.
Figure 79. Baud Rate Source Selection (Modes 1 and 3)
Figure 80. Baud Rate Formulas (Modes 1 and 3)
0
1
RBCK
BDRCON.2
T1
CLOCK
To serial
IBRG
CLOCK
reception Port
0
1
TBCK
BDRCON.3
T1
CLOCK
To serial
IBRG
CLOCK
transmission Port
/ 16
/ 16
Baud_Rate
=
6
(1-SPD)
⋅
32
⋅
(256 -BRL)
2
SMOD1
⋅
F
CK_SI
BRL = 256
-
6
(1-SPD
)
⋅
32
⋅
Baud_Rate
2
SMOD1
⋅
F
CK_SI
Baud_Rate
=
6
⋅
32
⋅
(256 -TH1)
2
SMOD1
⋅
F
CK_T1
TH1 = 256
-
192
⋅
Baud_Rate
2
SMOD1
⋅
F
CK_T1
a. IBRG Formula
b. T1 Formula