
Common Features Description
Atmel 8051 Microcontrollers Hardware Manual 2-98
4316E–8051–01/07
2.13.3 Internal Baud Rate
Generator (BRG)
When the internal Baud Rate Generator is used, the Baud Rates are determined by the
BRG overflow depending on the BRL reload value, the value of SPD bit (Speed Mode)
in BDRCON register and the value of the SMOD1 bit in PCON register.
Figure 2-20. Internal Baud Rate
• The baud rate for UART is token by formula:
Table 2-15. Example of computed value when X2=1, SMOD1=1, SPD=1
Example of computed value when X2=1, SMOD1=1, SPD=1
Table 2-16. Example of computed value when X2=0, SMOD1=0, SPD=0
Example of computed value when X2=0, SMOD1=0, SPD=0
BRG
0
1
/6
BRL
/2
0
1
INT_BRG
SPD
BRR
SMOD1
auto reload counter
overflow
Periph
Clock
F
PER
Baud Rates F
OSCA
= 16.384 MHz F
OSCA
= 24 MHz
BRL Error (%) BRL Error (%)
115200 247 1.23 243 0.16
57600 238 1.23 230 0.16
38400 229 1.23 217 0.16
28800 220 1.23 204 0.16
19200 203 0.63 178 0.16
9600 149 0.31 100 0.16
4800 43 1.23 - -
Baud Rates F
OSCA
= 16.384 MHz F
OSCA
= 24 MHz
BRL Error (%) BRL Error (%)
4800 247 1.23 243 0.16
2400 238 1.23 230 0.16
1200 220 1.23 204 0.16
600 185 0.16 152 0.16
Baud_Rate
=
2
SMOD1
x F
PER
6
(1-SPD)
x 32 x [256 - (BRL)]
(BRL) = 256 -
2
SMOD1
x F
PER
6
(1-SPD)
x 32 x Baud_Rate
Kommentare zu diesen Handbüchern