www
.mcu.com.cn
102
/
239
Rev.
1.00
CMS80F731x Reference Manual
11.
Timer 3/4 (Timer3/4)
Timer 3/4 is similar to timer 0/1 in that it is two 16-bit timers. Timer 3 has four modes of operation and Timer 4 has three
modes of operation. In contrast to Timer0/1, Timer3/4 only provides timer operations.
With the timer activated, the value of the register is incremented every 12 or 4 system cycles.
11.1 Overview
Timer 3 and timer 4 consist of two 8-bit registers {TH3,TL3} and {TH4,TL4}. Timers 3,4 operate in four identical modes.
The Timer3 and Timer4 modes are described below:
mode
M1
M0
Feature description
0
0
0
THx [7:0], TLx [4:0] make up a 13-bit timer
1
0
1
THx [7:0], TLx [7:0] make up a 16-bit timer
2
1
0
TLx [7:0] consists of an 8-bit auto-reload timer that is reinstalled from THx
3
1
1
TL3, TH3 are two 8-bit timers, and Timer4 stop counting
11.2 Related Registers
11.2.1
Timer3/4 Control Register T34MOD
0xD2
Bit7
Bit6
Bit5
Bit4
Bit3
Bit2
Bit1
Bit0
T34MOD
TR4
T4M
T4M1
T4M0
TR3
T3M
T3M1
T3M0
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
Reset value
0
0
0
0
0
0
0
0
Bit7
TR4:
Timer4 operational control bit;
1=
Timer4 starts;
0=
Timer4 is off.
Bit6
T4M:
Timer 4 clock select bits;
1=
Fsys/4;
0=
Fsys/12.
Bit5~Bit4
T4M<1:0>:
Timer 4 mode select bit;
00=
Mode 0, 13-bit timer;
01=
Mode 1, 16-bit timer;
10=
Mode 2, 8-bit automatic reload timer;
11=
Mode 3, Stop Count.
Bit3
TR3:
Timer3 operational control bit;
1=
Timer3 starts;
0=
Timer3 is off.
Bit2
T3M:
Timer 3 clock select bits;
1=
Fsys/4;
0=
Fsys/12.
Bit1~Bit0
T3M<1:0>:
Timer 3 mode select bit;
00=
Mode 0, 13-bit timer;
01=
Mode 1, 16-bit timer;
10=
Mode 2, 8-bit automatic reload timer;
11=
Mode 3, two independent 8-bit timers.