EVAL-ADUC836QS AD [Analog Devices], EVAL-ADUC836QS Datasheet - Page 55

no-image

EVAL-ADUC836QS

Manufacturer Part Number
EVAL-ADUC836QS
Description
MicroConverter, Dual 16-Bit ADCs with Embedded 62 kB Flash MCU
Manufacturer
AD [Analog Devices]
Datasheet
TIMER/COUNTER 2 OPERATING MODES
The following paragraphs describe the operating modes for
Timer/Counter 2. The operating modes are selected by bits in the
T2CON SFR, as shown in Table XXIX.
RCLK (or) TCLK
0
0
1
X
16-Bit Autoreload Mode
Autoreload mode has two options, which are selected by bit
EXEN2 in T2CON. If EXEN2 = 0, when Timer 2 rolls over,
it not only sets TF2 but also causes the Timer 2 reg is ters to be
reloaded with the 16-bit value in registers RCAP2L and RCAP2H,
which are preset by software. If EXEN2 = 1, Timer 2 still
performs the above, but with the added fea ture that a 1-to-0 tran-
sition at external input T2EX will also trigger the 16-bit reload
and set EXF2. The Autoreload mode is illustrated in Figure 52.
REV. 0
Table XXVIII. Timer 2 Operating Modes
T2EX
PIN
PIN
CORE
CLK*
T2
T2EX
CAP2
0
1
X
X
PIN
PIN
CORE
CLK*
T2
*THE CORE CLOCK IS THE OUTPUT OF THE PLL (SEE THE ON-CHIP PLL SECTION)
TRANSITION
DETECTOR
TRANSITION
DETECTOR
*THE CORE CLOCK IS THE OUTPUT OF THE PLL (SEE THE ON-CHIP PLL SECTION)
12
12
TR2
1
1
1
0
C/
C/
Figure 52. Timer/Counter 2, 16-Bit Autoreload Mode
C/
C/
Figure 53. Timer/Counter 2, 16-Bit Capture Mode
EXEN2
= 0
= 1
MODE
16-Bit Autoreload
16-Bit Capture
Baud Rate
OFF
= 0
= 1
EXEN2
CONTROL
TR2
CONTROL
TR2
CONTROL
RELOAD
CONTROL
CAPTURE
RCAP2L
(8 BITS)
–55–
TL2
RCAP2L
(8 BITS)
TL2
16-Bit Capture Mode
Capture Mode has two options, which are selected by bit EXEN2
in T2CON. If EXEN2 = 0, Timer 2 is a 16-bit timer or counter
that, upon overfl owing, sets bit TF2, the Tim er 2 overfl ow bit,
which can be used to generate an in ter rupt. If EXEN2 = 1, Timer 2
still performs the above, but a l-to-0 transition on external input
T2EX causes the current value in the Timer 2 registers, TL2
and TH2, to be captured into registers RCAP2L and RCAP2H,
respectively. In ad di tion, the transition at T2EX causes bit EXF2
in T2CON to be set; EXF2, like TF2, can generate an interrupt.
Cap ture mode is illustrated in Figure 53.
The baud rate generator mode is selected by RCLK = 1 and/or
TCLK = 1.
In either case, if Timer 2 is being used to generate the baud rate,
the TF2 interrupt fl ag will not occur. Therefore Timer 2 in ter -
rupts will not occur so they do not have to be disabled. However,
in this mode, the EXF2 fl ag can still cause in ter rupts and this can
be used as a third external interrupt.
Baud rate generation will be described as part of the UART serial
port operation.
RCAP2H
(8 BITS)
TH2
RCAP2H
(8 BITS)
TH2
EXF2
TF2
EXF2
TF2
TIMER
INTERRUPT
TIMER
INTERRUPT
ADuC836

Related parts for EVAL-ADUC836QS