C8051F340/1/2/3/4/5/6/7/8/9/A/B/C/D
19.1. Baud Rate Generator
The UART1 baud rate is generated by a dedicated 16-bit timer which runs from the controller's core clock
(SYSCLK), and has prescaler options of 1, 4, 12, or 48. The timer and prescaler options combined allow
for a wide selection of baud rates over many SYSCLK frequencies.
The baud rate generator is configured using three registers: SBCON1, SBRLH1, and SBRLL1. The
UART1 Baud Rate Generator Control Register (SBCON1, SFR Definition 19.4) enables or disables the
baud rate generator, and selects the prescaler value for the timer. The baud rate generator must be
enabled for UART1 to function. Registers SBRLH1 and SBRLL1 contain a 16-bit reload value for the dedi-
cated 16-bit timer. The internal timer counts up from the reload value on every clock tick. On timer over-
flows (0xFFFF to 0x0000), the timer is reloaded. For reliable UART operation, it is recommended that the
UART baud rate is not configured for baud rates faster than SYSCLK/16. The baud rate for UART1 is
defined in Equation 19.1.
Baud Rate
A quick reference for typical baud rates and system clock frequencies is given in Table 19.1.
Table 19.1. Baud Rate Generator Settings for Standard Baud Rates
Target Baud
Actual Baud
Rate (bps)
Rate (bps)
230400
230769
115200
115385
57600
28800
14400
9600
2400
1200
230400
230769
115200
115385
57600
28800
14400
9600
2400
1200
230400
230769
115200
115385
57600
28800
14400
9600
2400
1200
214
SYSCLK
-------------------------------------------------------------------------- -
=
65536 (SBRLH1:SBRLL1)
–
Equation 19.1. UART1 Baud Rate
Baud Rate
Error
0.16%
0.16%
57692
0.16%
28846
0.16%
14388
0.08%
9600
0.0%
2400
0.0%
1200
0.0%
0.16%
0.16%
57692
0.16%
28777
0.08%
14406
0.04%
9600
0.0%
2400
0.0%
1200
0.0%
0.16%
0.16%
57554
0.08%
28812
0.04%
14397
0.02%
9600
0.0%
2400
0.0%
1200
0.0%
Rev. 1.3
1
-- -
--------------------- -
2
Prescaler
Oscillator
SB1PS[1:0]
Divide
(Prescaler Bits)
Factor
52
11
104
11
208
11
416
11
834
11
1250
11
5000
11
10000
11
104
11
208
11
416
11
834
11
1666
11
2500
11
10000
11
20000
11
208
11
416
11
834
11
1666
11
3334
11
5000
11
20000
11
40000
11
1
Reload Value in
SBRLH1:SBRLL1
0xFFE6
0xFFCC
0xFF98
0xFF30
0xFE5F
0xFD8F
0xF63C
0xEC78
0xFFCC
0xFF98
0xFF30
0xFE5F
0xFCBF
0xFB1E
0xEC78
0xD8F0
0xFF98
0xFF30
0xFE5F
0xFCBF
0xF97D
0xF63C
0xD8F0
0xB1E0
Need help?
Do you have a question about the C8051F341 and is the answer not in the manual?
Questions and answers