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

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 0 AND 1 OPERATING MODES
The following paragraphs describe the operating modes for Timer/
Counters 0 and 1. Unless otherwise noted, it should be assumed
that these modes of operation are the same for both Timer 0 and 1.
Mode 0 (13-Bit Timer/Counter)
Mode 0 confi gures an 8-bit timer/counter with a divide-by-32
prescaler. Figure 48 shows Mode 0 operation.
In this mode, the timer register is confi gured as a 13-bit register.
As the count rolls over from all 1s to all 0s, it sets the timer over-
fl ow fl ag. The overfl ow fl ag, TF0, can then be used to re quest an
interrupt. The counted input is enabled to the timer when TR0 = 1
and either Gate = 0 or
timer to be controlled by external input
width measurements. TR0 is a control bit in the special function
register TCON; Gate is in TMOD. The 13-bit register consists
of all eight bits of TH0 and the lower fi ve bits of TL0. The upper
three bits of TL0 are indeterminate and should be ignored. Setting
the run fl ag (TR0) does not clear the reg is ters.
Mode 1 (16-Bit Timer/Counter)
Mode 1 is the same as Mode 0, except that the timer register is
running with all 16 bits. Mode 1 is shown in Figure 49.
ADuC836
*THE CORE CLOCK IS THE OUTPUT OF THE PLL (SEE THE ON-CHIP PLL SECTION)
P3.2/
P3.4/T0
P3.2/
P3.4/T0
*THE CORE CLOCK IS THE OUTPUT OF THE PLL (SEE THE ON-CHIP PLL SECTION)
CORE
CLK*
CORE
CLK*
GATE
GATE
Figure 48. Timer/Counter 0, Mode 0
12
Figure 49. Timer/Counter 0, Mode 1
12
TR0
TR0
C/ = 0
C/ = 1
C/ = 0
C/ = 1
= 1. Setting Gate = 1 allows the
CONTROL
CONTROL
(8 BITS)
(5 BITS)
TL0
TL0
(8 BITS)
(8 BITS)
TH0
TH0
to fa cil i tate pulse-
TF0
TF0
INTERRUPT
INTERRUPT
–54–
Mode 2 (8-Bit Timer/Counter with Auto Reload)
Mode 2 confi gures the timer register as an 8-bit counter (TL0)
with automatic reload, as shown in Figure 50. Over fl ow from TL0
not only sets TF0, but also reloads TL0 with the contents of TH0,
which are preset by software. The reload leaves TH0 unchanged.
Mode 3 (Two 8-Bit Timer/Counters)
Mode 3 has different effects on Timer 0 and Timer 1. Timer 1 in
Mode 3 simply holds its count. The effect is the same as setting
TR1 = 0. Timer 0 in Mode 3 establishes TL0 and TH0 as two
separate counters. This confi guration is shown in Figure 51. TL0
uses the Timer 0 control bits: C/ , Gate, TR0,
TH0 is locked into a timer function (counting machine cycles)
and takes over the use of TR1 and TF1 from Timer 1. Thus, TH0
now controls the Timer 1 interrupt. Mode 3 is provided for appli-
cations requiring an extra 8-bit timer or counter.
When Timer 0 is in Mode 3, Timer 1 can be turned on and off by
switching it out of and into its own Mode 3, or it can still be used by
the serial interface as a baud rate generator. In fact, it can be used in
any application not requiring an in ter rupt from Timer 1 itself.
P3.2/
P3.4/T0
P3.4/T0
P3.2/
*THE CORE CLOCK IS THE OUTPUT OF THE PLL (SEE THE ON-CHIP PLL SECTION)
*THE CORE CLOCK IS THE OUTPUT OF THE PLL (SEE THE ON-CHIP PLL SECTION)
CLK/12
CORE
CORE
CLK*
CLK*
CORE
GATE
GATE
TR1
Figure 50. Timer/Counter 0, Mode 2
12
12
Figure 51. Timer/Counter 0, Mode 3
TR0
TR0
C/ = 0
C/ = 1
C/ = 0
C/ = 1
CORE
CLK/12
CONTROL
CONTROL
RELOAD
(8 BITS)
(8 BITS)
(8 BITS)
(8 BITS)
TL0
TH0
TH0
TL0
TF0
TF1
TF0
, and TF0.
INTERRUPT
INTERRUPT
INTERRUPT
REV. 0

Related parts for EVAL-ADUC836QS