w79e532 Winbond Electronics Corp America, w79e532 Datasheet - Page 40

no-image

w79e532

Manufacturer Part Number
w79e532
Description
8-bit Microcontroller
Manufacturer
Winbond Electronics Corp America
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
w79e532A40FL
Manufacturer:
Nuvoton Technology Corporation of America
Quantity:
10 000
Part Number:
w79e532A40PL
Manufacturer:
Nuvoton Technology Corporation of America
Quantity:
10 000
11.2 Timer/Counter 2
Timer/Counter 2 is a 16 bit up/down counter which is configured by the T2MOD register and controlled
by the T2CON register. Timer/Counter 2 is equipped with a capture/reload capability. As with the
Timer 0 and Timer 1 counters, there exists considerable flexibility in selecting and controlling the
clock, and in defining the operating mode. The clock source for Timer/Counter 2 may be selected for
either the external T2 pin (C/T2 = 1) or the crystal oscillator, which is divided by 12 or 4 (C/T2 = 0).
The clock is then enabled when TR2 is a 1, and disabled when TR2 is a 0.
Capture Mode
The capture mode is enabled by setting the CP RL
mode, Timer/Counter 2 serves as a 16 bit up counter. When the counter rolls over from FFFFh to
0000h, the TF2 bit is set, which will generate an interrupt request. If the EXEN2 bit is set, then a
negative transition of T2EX pin will cause the value in the TL2 and TH2 register to be captured by the
RCAP2L and RCAP2H registers. This action also causes the EXF2 bit in T2CON to be set, which will
also generate an interrupt. Setting the T2CR bit (T2MOD.3), the W79E(L)532 allows hardware to reset
timer 2 automatically after the value of TL2 and TH2 have been captured.
TR0 = TCON.4
TR1 = TCON.6
GATE = TMOD.3
INT0 = P3.2
T0 = P3.4
ptd
1/12
1/4
T0M = CKCON.3
0
1
1
C/T = TMOD.2
0
Figure 13. Timer/Counter 0 Mode 3
/
- 40 -
2 bit in the T2CON register to a 1. In the capture
0
0
TH0
TL0
W79E532/W79L532
7
7
TF1
TF0
Interrupt
Interrupt

Related parts for w79e532