English
Language : 

IC80C32 Datasheet, PDF (17/48 Pages) Integrated Circuit Solution Inc – CMOS SINGLE CHIP 8-BIT MICROCONTROLLER
IC80C52
IC80C32
OSC
DIVIDE 12
1/12F OSC
1/12F OSC
C/T = 0
T0 PIN
GATE
INT0 PIN
1/12F OSC
C/T = 1
TR0
TR1
TL0
(8 BITS)
CONTROL
TH0
(8 BITS)
CONTROL
TF0
INTERRUPT
TF1
INTERRUPT
Figure 11. Timer/Counter 0 Mode 3: Two 8-Bit Counters
Timer 2
Timer 2 is 16-bit Timer/Counter present only in the IC80C54/
58.This is a powerful addition to the other two just discussed.
Five extra special function registers are added to
accommodate Timer 2 which are: the timer registers, TL2
and TH2, the timer control register, T2CON, and the
capture registers, RCAP2L and RCAP2H. Like Timers 0
and 1, it can operate either as a timer or as an event
counter, depending on the value of bit C/T2 in the Special
Function Register T2CON. Timer 2 has three operating
modes: capture, auto-reload, and baud rate generator,
which are selected by RCLK, TCLK, CP/RL2, and TR2.
In the Capture Mode, the EXEN2 bit in T2CON selects two
options. If EXEN2 = 0, then Timer 2 is a 16-bit timer or
counter whose overflow sets bit TF2, the Timer 2 overflow
bit, which can be used to generate an interrupt. If EXEN2
= 1, then Timer 2 performs the same way, but a 1-to-0
transition at external input T2EX also causes the current
value in the Timer 2 registers, TL2 and TH2, to be captured
into the RCAP2L and RCAP2H registers, respectively. In
addition, the transition at T2EX sets the EXF2 bit in T2CON,
and EXF2, like TF2, can generate an interrupt.
The Capture Mode is illustrated in Figure 12.
In the auto-reload mode, the EXEN2 bit in T2CON also
selects two options. If EXEN2 = 0, then when Timer 2 rolls
over it sets TF2 and also reloads the Timer 2 registers with
the 16-bit value in the RCAP2L and RCAP2H registers,
which are preset by software. If EXEN2 = 1, then Timer 2
performs the same way, but a 1-to-0 transition at external
input T2EX also triggers the 16-bit reload and sets EXF2.
The auto-reload mode is illustrated in Figure 13.
The baud rate generator mode is selected by RCLK = 1
and/or TCLK = 1. This mode is described in conjunction
with the serial port (see Figure 14).
Integrated Circuit Solution Inc.
17
MC002-0B