www
.mcu.com.cn
85
/
239
Rev.
1.00
CMS80F731x Reference Manual
9.5
Timer1 Working Mode
9.5.1
T1 - Mode 0 (13-bit Timing/Counting Mode)
In this mode, timer 1 is a 13-bit register. When all the bits of the counter are flipped from 1 to 0, the timer 1 interrupt flag
TF1 is set to 1. When TCON.6=1 and TMOD.7=0 or when TCON.6=1, TMOD.7=1, and T1G=1, the count input is enabled to
timer 1. (Setting TMOD.7=1 allows timer 1 to be controlled by an external pin, T1G, for pulse width measurements). The 13-bit
register consists of TH1 8 bits and TL1 low 5 bits. TL1 high three bits should be ignored. Timer1 Mode 0 block diagram is
shown in the following figure:
TMOD.7
TCON.6
TCON.7
TL1
5Bit
T1G
:12-T1M=0
: 4-T1M=1
T1
TMOD.6=0
TMOD.6=1
TH1
8Bit
interrupt request
CLK
9.5.2
T1 - Mode 1 (16-bit Timing/Counting Mode)
Mode 1 is the same as mode 0, except that the timer 1 registers 16 bits are all running in mode 1. The Timer1 mode 1
block diagram is shown in the following figure:
TMOD.7
TCON.6
TCON.7
TL1
5Bit
T1G
:12-T1M=0
: 4-T1M=1
T1
TMOD.6=0
TMOD.6=1
TH1
8Bit
interrupt request
CLK