• Calculating the baud rate and error values
For a clock frequency of 4MHz, and with BRGH set to 0 determine the BRG register value N,
the actual baud rate and the error value for a desired baud rate of 4800.
From the above table the desired baud rate BR=
Re-arranging this equation gives N=
Giving a value for N=
To obtain the closest value, a decimal value of 12 should be placed into the BRG register. This
gives an actual or calculated baud rate value of
4000000
BR=
[64 (12+1)]
Therefore the error is equal to
The following tables show the actual values of baud rate and error values for the two value of
BRGH.
Baud
Rate
f
=4MHz
CLKI
K/BPS
BRG
Kbaud
0.3
20�
0.300
�.2
5�
�.202
2.4
25
2.404
4.8
�2
4.808
9.6
6
8.929
�9.2
2
20.833
38.4
—
—
5�.6
0
62.500
��5.2
—
—
Baud
Rate
f
=4MHz
CLKI
K/BPS
BRG
Kbaud
0.3
—
—
�.2
20�
�.202
2.4
�03
2.404
4.8
5�
4.808
9.6
25
9.6�5
�9.2
�2
�9.23�
38.4
6
35.��4
5�.6
3
62.5
��5.2
�
�25
250
0
250
Rev. 2.50
HT66F20/HT66F30/HT66F40/HT66F50/HT66F60
HT66FU30/HT66FU40/HT66FU50/HT66FU60
f
CLKI
(BR×64)
4000000
−1
=12.0208
(4800×64)
=4808
4808−4800
=0.16%
4800
Baud Rates for BRGH=0
f
=3.579545MHz
CLKI
Error(%)
BRG
Kbaud
0.�6
�85
0.300
0.�6
46
�.�90
0.�6
22
2.432
0.�6
��
4.66�
-6.99
5
9.32�
8.5�
2
�8.643
—
—
—
8.5�
0
55.930
—
—
—
Baud Rates and Error Values for BRGH=0
Baud Rates for BRGH=1
f
=3.579545MHz
CLKI
Error(%)
BRG
Kbaud
—
—
—
0.�6
�85
�.203
0.�6
92
2.406
0.�6
46
4.�6
0.�6
22
9.�2�
0.�6
��
�8.643
-6.99
5
3�.286
8.5�
3
55.930
8.5�
�
���.86
0
—
—
Baud Rates and Error Values for BRGH=1
248
A/D Flash MCU with EEPROM
f
CLKI
[64 (N+1)]
−1
f
=7.159MHz
CLKI
Error(%)
BRG
Kbaud
0.00
—
—
-0.83
92
�.203
�.32
46
2.380
-2.90
22
4.863
-2.90
��
9.322
-2.90
5
�8.643
—
2
32.286
-2.90
�
55.930
—
0
���.859
f
=7.159MHz
CLKI
Error(%)
BRG
Kbaud
—
—
—
0.23
—
—
0.23
�85
2.406
-0.83
92
4.8��
�.32
46
9.520
-2.90
22
�9.454
-2.90
��
3�.286
-2.90
�
55.930
-2.90
3
���.86
—
—
—
Error(%)
—
0.23
-0.83
�.32
-2.90
-2.90
-2.90
-2.90
-2.90
Error(%)
—
—
0.23
0.23
-0.83
�.32
-2.90
-2.90
-2.90
—
��ne 22� 20��
Need help?
Do you have a question about the HT66F20 and is the answer not in the manual?