English
Language : 

EZ-USB Datasheet, PDF (308/334 Pages) Cypress Semiconductor – The EZ-USB USB Integrated Circuit
C.2.8.4 16-Bit Timer/Counter Mode with Auto-Reload
When CP/RL2 = 0, Timer 2 is configured for the auto-reload mode illustrated in Figure C-5..
Control of counter input is the same as for the other 16-bit counter modes. When the count
increments from FFFFh, Timer 2 sets the TF2 flag and the starting value is reloaded into TL2
and TH2. The software must preload the starting value into the RCAP2L and RCAP2H
registers.
When Timer 2 is in auto-reload mode, a reload can be forced by a high-to-low transition on
the T2EX pin, if enabled by EXEN2 = 1.
CLK24
Divide by 12
Divide by 4
T2M
0
1
0 C/ T2
1
T2 pin
TR2
EXEN2
T2EX pin
CLK
0
TL2
78
15
TH2
RCAP2L
RCAP2H
0
78
15
EXF2
TF2
INT
Figure C-5. Timer 2 - Timer/Counter with Auto Reload
C.2.8.5 Baud Rate Generator Mode
Setting either RCLK or TCLK to 1 configures Timer 2 to generate baud rates for Serial Port 0
in serial mode 1 or 3. In baud rate generator mode, Timer 2 functions in auto-reload mode.
However, instead of setting the TF2 flag, the counter overflow is used to generate a shift clock
for the serial port function. As in normal auto-reload mode, the overflow also causes the
preloaded start value in the RCAP2L and RCAP2H registers to be reloaded into the TL2 and
TH2 registers.
When either TCLK = 1 or RCLK = 1, Timer 2 is forced into auto-reload operation, regardless
of the state of the CP/RL2 bit.
When operating as a baud rate generator, Timer 2 does not set the TF2 bit. In this mode, a
Timer 2 interrupt can only be generated by a high-to-low transition on the T2EX pin setting
the EXF2 bit, and only if enabled by EXEN2 = 1.
C - 12
Appendix C: 8051 Hardware Description
EZ-USB TRM v1.9