GMS81C2012/GMS81C2020
HYUNDAI MicroElectronics
12. TIMER/EVENT COUNTER
The GMS81C20xx has two Timer/Counter registers. Each
module can generate an interrupt to indicate that an event
has occurred (i.e. timer match).
sponse to a 1-to-0 (falling edge) or 0-to-1(rising edge) tran-
sition at its corresponding external input pin, EC0.
In addition the “capture” function, the register is increased
in response external or internal clock sources same with
timer or counter function. When external clock edge input,
the count register is captured into capture data register
CDRx.
Timer 0 and Timer 1 are can be used either two 8-bit Tim-
er/Counter or one 16-bit Timer/Counter with combine
them.
In the "timer" function, the register is increased every in-
ternal clock input. Thus, one can think of it as counting in-
ternal clock input. Since a least clock consists of 2 and
most clock consists of 2048 oscillator periods, the count
rate is 1/2 to 1/2048 of the oscillator frequency in Timer0.
And Timer1 can use the same clock source too. In addition,
Timer1 has more fast clock source (1/1 to 1/8).
Timer1 is shared with "PWM" function and "Compare out-
put" function
It has seven operating modes: "8-bit timer/counter", "16-
bit timer/counter", "8-bit capture", "16-bit capture", "8-bit
compare output", "16-bit compare output" and "10-bit
PWM" which are selected by bit in Timer mode register
TM0 and TM1 as shown in Figure 12-1 and Table 12-1.
In the “counter” function, the register is increased in re-
T0CK T1CK
16BIT CAP0 CAP1 PWM1E
PWM1O
TIMER 0
TIMER 1
[2:0]
XXX
111
[1:0]
XX
XX
XX
XX
11
0
0
0
0
1
1
1
1
0
0
1
X
0
0
1
0
0
1
0
0
0
0
X
0
0
0
0
1
0
0
0
0
0
0
1
1
0
0
0
1
8-bit Timer
8-bit Event counter
8-bit Capture (internal clock) 8-bit Compare Output
8-bit Timer
8-bit Capture
XXX
XXX
XXX
111
8-bit Timer/Counter
16-bit Timer
10-bit PWM
11
16-bit Event counter
16-bit Capture (internal clock)
16-bit Compare Output
XXX
XXX
11
11
Table 12-1 Operating Modes of Timer0 and Timer1
48
MAR. 2000 Ver 1.00