English
Language : 

EVAL-ADUC831QSZ Datasheet, PDF (58/76 Pages) Analog Devices – MicroConverter®, 12-Bit ADCs and DACs with Embedded 62 kBytes Flash MCU
ADuC831
Timer 3 Generated Baud Rates
The high integer dividers in a UART block mean that high speed
baud rates are not always possible using some particular crystals.
For example, using a 12 MHz crystal, a baud rate of 115200 is
not possible. To address this problem, the ADuC831 has added
a dedicated baud rate timer (Timer 3) specifically for generating
highly accurate baud rates.
Timer 3 can be used instead of Timer 1 or Timer 2 for generating
very accurate high speed UART baud rates including 115200
and 230400. Timer 3 also allows a much wider range of baud
rates to be obtained. In fact, every desired bit rate from 12 bit/s
to 393216 bit/s can be generated to within an error of ± 0.8%.
Timer 3 also frees up the other three timers, allowing them to
be used for different applications. A block diagram of Timer 3 is
shown in Figure 54 below.
CORE
CLK
2
FRACTIONAL
DIVIDER
(1 + T3FD/64)
TIMER 1/TIMER 2
TX CLOCK (FIG 53)
TIMER 1/TIMER 2
RX CLOCK (FIG 53)
10
2DIV
10
16
T3 RX/TX
CLOCK
RX CLOCK
T3EN
TX CLOCK
Figure 54. Timer 3, UART Baud Rates
Two SFRs (T3CON and T3FD) are used to control Timer 3.
T3CON is the baud rate control SFR, allowing Timer 3 to be
used to set up the UART baud rate, and setting up the binary
divider (DIV).
Table XXVI. T3CON SFR Bit Designations
Bit Name
Description
7
T3BAUDEN T3UARTBAUD Enable
Set to enable Timer 3 to generate
the baud rate. When set, PCON.7,
T2CON.4 and T2CON.5 are ignored.
Cleared to let the baud rate be
generated as per a standard 8052.
6
–
5
–
4
–
3
–
2
DIV2
Binary Divider Factor.
1
DIV1
DIV2 DIV1 DIV0 Bin Divider
0
DIV0
000
1
001
1
010
1
011
1
100
1
101
1
110
1
111
1
The appropriate value to write to the DIV2-1-0 bits can be calcu-
lated using the following formula where fCORE is the crystal
frequency:
Note: The DIV value must be rounded down.
DIV
=
log


32
×
fCORE
Baud
Rate


log(2)
T3FD is the fractional divider ratio required to achieve the
required baud rate. We can calculate the appropriate value for
T3FD using the following formula.
Note: T3FD should be rounded to the nearest integer.
T 3FD =
2 × fCORE
2DIV × Baud Rate
Once the values for DIV and T3FD are calculated the actual
baud rate can be calculated using the following formula.
Actual Baud Rate =
2 × fCORE
2DIV × (T3FD+ 64)
For example, to get a baud rate of 115200 while operating at
11.0592 MHz:
( ) DIV = LOG 11059200 / (32 × 115200) / LOG2 = 1.58 = 1
( ) T 3FD = (2 × 11059200) / 21 × 115200 – 64 = 32 = 20H
Therefore, the actual baud rate is 115200 bit/s.
Table XXVII. Commonly Used Baud Rates Using Timer 3
Ideal
%
Baud Crystal DIV T3CON T3FD Error
230400 11.0592 0
80H
20H 0.0
115200 11.0592 1
81H
20H 0.0
57600 11.0592 2
82H
20H 0.0
38400 11.0592 3
83H
08H 0.0
19200 11.0592 4
84H
08H 0.0
9600 11.0592 5
85H
08H 0.0
230400 12
115200 12
57600 12
38400 12
19200 12
9600 12
0
80H
28H 0.16
1
81H
28H 0.16
2
82H
28H 0.16
3
83H
0EH 0.16
4
84H
0EH 0.16
5
85H
0EH 0.16
230400 14
115200 14
57600 14
38400 14
19200 14
9600 14
0
80H
3AH 0.39
1
81H
3AH 0.39
2
82H
3AH 0.39
3
83H
1BH 0.16
4
84H
1BH 0.16
5
85H
1BH 0.16
230400 16
115200 16
57600 16
38400 16
19200 16
9600 16
1
81H
05H 0.64
2
82H
05H 0.64
3
83H
05H 0.64
3
83H
28H 0.16
4
84H
28H 0.16
5
85H
28H 0.16
–58–
REV. 0