
21.2.
Baud Rate Configuration Register
KING BILLION ELECTRONICS CO., LTD
駿
億
電
子
股
份
有
限
公
司
HE84760B
HE80004 Series
June 29, 2005
This specification is subject to change without notice. Please contact sales person for the latest version before use.
39
V1.0
The BRH and BRL registers hold the upper and lower bytes of 16 bit baud rate divisor and which are
readable/writable. The baud rate of UART is calculated as following:
RATE
BAUD
FCK
DIVISOR
RATE
BAUD
_
*
16
_
_
=
, (
FCK: fast clock of system
)
The contents of BRH and BRL are calculated by the following two formulas:
BRL =
DIVISOR
RATE
BAUD
_
_
% 256
BRH = (
DIVISOR
RATE
BAUD
_
_
– BRL) / 256
The “%” symbol is the modulus operation (reminder of division). For example, if the FCK is 1.8432M Hz
and the desired baud rate is 2400 baud, then
48
2400
*
16
1843200
_
_
=
=
DIVISOR
RATE
BAUD
The BRL register shall be set to 0x30 and BRH set to 0x00. The setting of baud_rate_divisor is not
updated until the BRH register is written. Thus user is strongly recommended to write BRL first, then
BRH.
In order to obtain good communication quality, the same time base shall be used in the both sides of
transmitting and receiving. The following table shows the most common baud rate setting used in the PC
UART communication.
BRL and BRH: Baud Rate Control Registers
FCK(Hz) Baud Rate (bps)
1.8432M
50
1.8432M
300
1.8432M
1200
1.8432M
2400
1.8432M
4800
1.8432M
9600
1.8432M
19200
1.8432M
38400
1.8432M
57600
1.8432M
115200
Divisor
2304
384
96
48
24
12
6
3
2
1
BRL
0x00
0x80
0x60
0x30
0x18
0x0C
0x06
0x03
0x02
0x01
BRH
0x09
0x01
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00