Rev. 2.50 248 June 22, 2017 Rev. 2.50 249 June 22, 2017
HT66F20/HT66F30/HT66F40/HT66F50/HT66F60
HT66FU30/HT66FU40/HT66FU50/HT66FU60
A/D Flash MCU with EEPROM
HT66F20/HT66F30/HT66F40/HT66F50/HT66F60
HT66FU30/HT66FU40/HT66FU50/HT66FU60
A/D Flash MCU with EEPROM
• Calculatingthebaudrateanderrorvalues
Foraclockfrequencyof4MHz,andwithBRGHsetto0determinetheBRGregistervalueN,
theactualbaudrateandtheerrorvalueforadesiredbaudrateof4800.
FromtheabovetablethedesiredbaudrateBR=
CLKI
[64 (N+1)]
Re-arrangingthisequationgivesN=
CLKI
−1
×64)
GivingavalueforN=
−1
×64)
=12.0208
Toobtaintheclosestvalue,adecimalvalueof12shouldbeplacedintotheBRGregister.This
givesanactualorcalculatedbaudratevalueof
BR=
[64 (12+1)]
=4808
Thereforetheerrorisequalto
=0.16%
Thefollowingtablesshowtheactualvaluesofbaudrateanderrorvaluesforthetwovalueof
BRGH.
Baud
Rate
K/BPS
Baud Rates for BRGH=0
f
CLKI
=4MHz f
CLKI
=3.579545MHz f
CLKI
=7.159MHz
BRG Kbaud Error(%) BRG Kbaud Error(%) BRG Kbaud Error(%)
0.3
207 0.300 0.16 185 0.300 0.00 — — —
1.2 51 1.202 0.16 46 1.190 -0.83 92 1.203 0.23
2.4 25 2.404
0.16 22 2.432 1.32 46 2.380 -0.83
4.8
12 4.808 0.16 11 4.661 -2.90 22 4.863 1.32
9.6 6 8.929 -6.99 5 9.321 -2.90 11 9.322 -2.90
19.2 2 20.833 8.51 2 18.643 -2.90 5 18.643 -2.90
38.4 — — — — — — 2 32.286 -2.90
57.6 0 62.500 8.51 0 55.930 -2.90 1 55.930 -2.90
115.2 — — — — — — 0 111.859 -2.90
Baud Rates and Error Values for BRGH=0
Baud
Rate
K/BPS
Baud Rates for BRGH=1
f
CLKI
=4MHz f
CLKI
=3.579545MHz f
CLKI
=7.159MHz
BRG Kbaud Error(%) BRG Kbaud Error(%) BRG Kbaud Error(%)
0.3 — — — — — — — — —
1.2 207 1.202 0.16 185 1.203 0.23 — — —
2.4
103 2.404 0.16 92 2.406 0.23 185 2.406 0.23
4.8
51 4.808 0.16 46 4.76 -0.83 92 4.811 0.23
9.6 25
9.615 0.16 22 9.727 1.32 46 9.520 -0.83
19.2 12 19.231 0.16 11 18.643 -2.90 22 19.454 1.32
38.4 6 35.714 -6.99 5 37.286 -2.90 11 37.286 -2.90
57.6 3 62.5 8.51 3 55.930 -2.90 7 55.930 -2.90
115.2 1 125 8.51 1 111.86 -2.90 3 111.86 -2.90
250 0 250 0 — — — — — —
Baud Rates and Error Values for BRGH=1