
EZ-USB FX2 Technical Reference Manual
Page 14-6 EZ-USB FX2 Technical Reference Manual v2.1
Figure 14-2. Timer 0/1 - Mode 2
14.2.2.4 Mode 3, Two 8-Bit Counters — Timer 0 Only
In mode 3, Timer 0 operates as two 8-bit counters. Selecting mode 3 for Timer 1 simply stops
Timer 1.
As shown in Figur e14-3, TL0 is configured as an 8-bit counter controlled by the normal Timer 0
control bits. TL0 can either count CLKOUT cycles (divided by 4 or by 12) or high-to-low transitions
on the T0 pin, as determined by the C/T
Bit. The GATE function can be used to give counter
enable control to the INT0
pin.
TH0 functions as an independent 8-bit counter. However, TH0 can only count
CLKOUT cycles
(divided by 4 or by 12). The Timer 1 control and flag bits (TR1 and TF1) are used as the control
and flag bits for TH0.
When Timer 0 is in mode 3, Timer 1 has limited usage because Timer 0 uses the Timer 1 control
bit (TR1) and interrupt flag (TF1). Timer 1 can still be used for baud rate generation and the Timer
1 count values are still available in the TL1 and TH1 Registers.
Control of Timer 1 when Timer 0 is in mode 3 is through the Timer 1 mode bits. To turn Timer 1 on,
set Timer 1 to mode 0, 1, or 2. To turn Timer 1 off, set it to mode 3. The Timer 1 C/T
Bit and T1M
Bit are still available to Timer 1. Therefore, Timer 1 can count CLKOUT/4, CLKOUT/12, or high-to-
low transitions on the T1
pin. The Timer 1 GATE function is also available when Timer 0 is in
mode 3.
TL0 (or TL1)
0
7
Divide by 12
Divide by 4
T0 (or T1) pin
TR0 (or TR1)
GATE
INT0 (or
INT1
) pin
70
TF0 (or TF1)
TH0 (or TH1)
T0M (or T1M)
RELOAD
INT
0
1
0
1
To Serial Port
(Timer 1 only)
CLKOUT
CLK
C/ T
Komentarze do niniejszej Instrukcji