Hardware manual

Common Features Description
Atmel 8051 Microcontrollers Hardware Manual 2-47
4316A–8051–01/04
The baud rate in Mode 2 depends on the value of bit SMOD in Special Function Regis-
ter PCON.
If SMOD = 0 (which is its value on reset), the baud rate is 1/64 the oscillator frequency.
If SMOD = 1, the baud rate is 1/32 the oscillator frequency.
In the 80C51, the baud rates in Modes 1 and 3 are determined by the Timer 1 overflow
rate. In case of Timer2, these baud rates can be determined by Timer 1, or by Timer 2,
or by both (one for transmit and the other for receive).
Baud Rate Selection for
UART for Mode 1 and 3
The Baud Rate Generator for transmit and receive clocks can be selected separately via
the T2CON and BDRCON registers.
Figure 2-19. Baud Rate Selection
2.13.2 Baud Rate Selection
Table for UART
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.
RCLK
/ 16
RBCK
INT_BRG
0
1
TIMER1
0
1
0
1
TIMER2
INT_BRG
TIMER1
TIMER2
TIMER_BRG_RX
Rx Clock
/ 16
0
1
TIMER_BRG_TX
Tx Clock
TBCK
TCLK
TCLK
(T2CON)
RCLK
(T2CON)
TBCK
(BDRCON)
RBCK
(BDRCON)
Clock Source
UART Tx
Clock Source
UART Rx
00 0 0 Timer 1 Timer 1
10 0 0 Timer 2 Timer 1
01 0 0 Timer 1 Timer 2
11 0 0 Timer 2 Timer 2
X0 1 0 INT_BRG Timer 1
X1 1 0 INT_BRG Timer 2
0X 0 1 Timer 1 INT_BRG
1X 0 1 Timer 2 INT_BRG
XX 1 1 INT_BRGINT_BRG