aduc814aru-reel7 Analog Devices, Inc., aduc814aru-reel7 Datasheet - Page 56

no-image

aduc814aru-reel7

Manufacturer Part Number
aduc814aru-reel7
Description
Microconverter, Small Package 12-bit Adc With Embedded Flash Mcu
Manufacturer
Analog Devices, Inc.
Datasheet
ADuC814
Timer 2 Generated Baud Rates
Baud rates can also be generated using Timer 2. Using Timer 2
is similar to using Timer 1 in that the timer must overflow 16
times before a bit is transmitted/received. Because Timer 2 has a
16-bit autoreload mode, a wide range of baud rates is possible
using Timer 2.
Therefore, when Timer 2 is used to generate baud rates, the
timer increments every two clock cycles and not every core
machine cycle as before. Therefore, it increments six times faster
than Timer 1, and therefore baud rates six times faster are
possible. Because Timer 2 has 16-bit autoreload capability, very
low baud rates are still possible. Timer 2 is selected as the baud
rate generator by setting the CLK and/or RCLK in T2CON. The
baud rates for transmit and receive can be simultaneously
different. Setting RCLK and/or TCLK puts Timer 2 into its baud
rate generator mode as shown in Figure 53.
Modes 1 and 3 Baud Rate = (1/16) × (Timer 2 Overflow Rate)
NOTE: OSCILLATOR FREQUENCY IS DIVIDED BY 2, NOT 12
NOTE: AVAILABILITY OF ADDITIONAL
EXTERNAL INTERRUPT
T2EX
TRANSITION
*THE CORE CLOCK IS THE OUTPUT OF THE PLL
DETECTOR
PIN
PIN
CORE
CLK*
T2
÷2
C/T2 = 0
C/T2 = 1
EXEN2
CONTROL
CONTROL
TR2
Figure 53. Timer 2, UART Baud Rates
EXF 2
Rev. A | Page 56 of 72
RCAP2L
(8 BITS)
TL2
TIMER 2
INTERRUPT
(8 BITS)
RCAP2H
TL2
In this case, the baud rate is given by the formula
Table 28 shows some commonly used baud rates and how they
could be calculated from a core clock frequency of 2.0971 MHz
and 16.7772 MHz.
Table 28. Commonly Used Baud Rates, Timer 2
Ideal
Baud
19200
9600
2400
1200
9600
2400
1200
RELOAD
OVERFLOW
TIMER 2
Core
CLK
16.78
16.78
16.78
16.78
2.10
2.10
2.10
Modes 1 and 3 Baud Rate = (Core Clk)/
(32 × [65536 – (RCAP2H, RCAP2L)])
1
1
÷2
RCAP2H
Value
–1 (FFH)
–1 (FFH)
–1 (FFH)
–2 (FEH)
–1 (FFH)
–1 (FFH)
–1 (FFH)
OVERFLOW
TIMER 1
0
0
0
1
RCLK
TCLK
÷16
÷16
–181 (4BH)
RCAP2L
Value
–27 (E5H)
–55 (C9H)
–218 (26H)
–7 (FBH)
–27 (ECH)
–55 (D7H)
SMOD
RX
CLOCK
TX
CLOCK
Actual
Baud
19418
9532
2405
1199
9362
2427
1191
%
Error
1.14
0.7
0.21
0.02
2.4
1.14
0.7

Related parts for aduc814aru-reel7