English
Language : 

C8051F388 Datasheet, PDF (202/285 Pages) –
C8051F388/9/A/B
23.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 ) 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 dedicated 16-bit
timer. The internal timer counts up from the reload value on every clock tick. On timer overflows (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 23.1.
Baud Rate = ----------------------------S----Y----S----C----L----K------------------------------  1--  ------------1------------
65536 – (SBRLH1:SBRLL1) 2 Prescaler
Equation 23.1. UART1 Baud Rate
A quick reference for typical baud rates and system clock frequencies is given in Table 23.1.
Table 23.1. Baud Rate Generator Settings for Standard Baud Rates
Target Baud Actual Baud Baud Rate
Rate (bps) Rate (bps)
Error
230400
115200
57600
28800
14400
9600
2400
1200
230400
115200
57600
28800
14400
9600
2400
1200
230400
115200
57600
28800
14400
9600
2400
1200
230769
115385
57692
28846
14388
9600
2400
1200
230769
115385
57692
28777
14406
9600
2400
1200
230769
115385
57554
28812
14397
9600
2400
1200
0.16%
0.16%
0.16%
0.16%
0.08%
0.0%
0.0%
0.0%
0.16%
0.16%
0.16%
0.08%
0.04%
0.0%
0.0%
0.0%
0.16%
0.16%
0.08%
0.04%
0.02%
0.0%
0.0%
0.0%
Oscillator
Divide
Factor
52
104
208
416
834
1250
5000
10000
104
208
416
834
1666
2500
10000
20000
208
416
834
1666
3334
5000
20000
40000
SB1PS[1:0]
Reload Value in
(Prescaler Bits) SBRLH1:SBRLL1
11
0xFFE6
11
0xFFCC
11
0xFF98
11
0xFF30
11
0xFE5F
11
0xFD8F
11
0xF63C
11
0xEC78
11
0xFFCC
11
0xFF98
11
0xFF30
11
0xFE5F
11
0xFCBF
11
0xFB1E
11
0xEC78
11
0xD8F0
11
0xFF98
11
0xFF30
11
0xFE5F
11
0xFCBF
11
0xF97D
11
0xF63C
11
0xD8F0
11
0xB1E0
202
Rev. 1.1