GMS81C5108
48
JUNE 2001 Ver 1.0
Table 12-1 Operating Modes of Timer 0 and Timer 1
12.1 8-Bit Timer/Counter Mode
The GMS81C5108 has two 8-bit Timer/Counters, Timer 0,
Timer 1, as shown in Figure 12-3.
The “timer” or “counter” function is selected by mode reg-
isters TMx as shown in Figure 12-1 and Table 12-1. To use
as an 8-bit timer/counter mode, bit CAP0 of TM0 is
cleared to “0” and bits 16BIT of TM1 should be cleared to
“0” (Table 12-1 ).
Figure 12-3 Block Diagram of Timer/Event Counter
16BIT
CAP0
CAP1
PWME
T0CK[2:0]
T1CK[1:0]
PWMO
Timer 0
Timer 1
0
0
0
0
XXX
XX
0
8 Bit Timer
8 Bit Timer
0
0
1
0
111
XX
0
8 Bit Event Counter
8 Bit Capture
0
1
0
0
XXX
XX
1
8 Bit Capture
8 Bit Compare Output
0
0
0
1
XXX
XX
1
8 Bit Timer/Counter
10 Bit PWM
1
0
0
0
XXX
11
0
16 Bit Timer
1
0
0
0
111
11
0
16 Bit Event Counter
1
1
X
1
0
XXX
11
0
16 Bit Capture
1
0
0
0
XXX
11
1
16 Bit Compare Output
1.
X: The value “0” or “1” corresponding your operation.
÷
1
÷
2
÷
8
TM0
ADDRESS : 0E0
H
RESET VALUE : --000000
B
-
-
CAP0
T0CK2
T0CK1
T0CK0
T0CN
T0ST
TM1
ADDRESS : 0E2
H
RESET VALUE : 00000000
B
POL
16BIT
PWME
CAP1
T1CK1
T1CK0
T1CN
T1ST
0
X
X
X
X
X
X
0
0
0
X
X
X
X
÷
2
÷
4
÷
128
÷
512
÷
8
÷
32
EC0
Edge Detector
MUX
MUX
1
1
T0 (8-bit)
TDR0 (8-bit)
T0IF
CLEAR
COMPARATOR
TIMER 0
INTERRUPT
T1 (8-bit)
TDR1 (8-bit)
T1IF
CLEAR
COMPARATOR
TIMER 1
INTERRUPT
T0ST
0 : Stop
1 : Clear and Start
T1ST
0 : Stop
1 : Clear and Start
T0CN
T1CN
T0CK[2:0]
T1CK[1:0]
F/F
COMPO PIN (R31)
÷
1024
X : The value “0” or “1” corresponding your operation.
PWMO
[PMR.6]
SX
IN
0X
1X
X
IN
SCMR[1:0]
2
Downloaded from
Elcodis.com
electronic components distributor