HYUNDAI MicroElectronics
GMS82512/16/24
11. TIMER/EVENT COUNTER
The GMS825xx has four Timer/Counter registers. Each
module can generate an interrupt to indicate that an event
has occurred (i.e. timer match).
sponding external input pin, EC0 .
In addition the “capture” function, the register is incre-
mented in response external or internal clock sources same
with timer or counter function. When external clock edge
input, the count register is captured into Timer data register
correspondingly.
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. And Timer 2 and Timer 3 are can be used either two
8-bit Timer or one 16-bit Timer with combine them.
It has four operating modes: “8-bit timer/counter”, “16-bit
timer/counter”, “8-bit capture”, “16-bit capture” which are
selected by bit in Timer mode register TM0 and TM2 as
shown in Table 11-1.
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 4 and
most clock consists of 64 oscillator periods, the count rate
is 1/4 to 1/64 of the oscillator frequency.
In operation of Timer 2, Timer 3, their operations are same
with Timer 0, Timer 1, respectively as shown in Table 11-
2.
In the “counter” function, the register is incremented in re-
sponse to a 1-to-0 (falling edge) transition at its corre-
TM0
TIMER 0
TIMER 1
CAP
0
T1SL
[1:0]
T1ST
T0ST T0CN
T0SL[1:0]
0
0
1
1
0
0
1
1
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
01 or 10 or 11
8-bit Timer
8-bit Event counter
8-bit Timer
8-bit Timer
01 or
10 or
11
00
01 or 10 or 11
00
8-bit Capture (internal clock) 8-bit Timer
8-bit Capture (external clock) 8-bit Timer
16-bit Timer
01 or 10 or 11
00
16-bit Event counter
00
01 or 10 or 11
00
16-bit Capture (internal clock)
16-bit Capture (external clock)
Table 11-1 TM0 Timer Mode Register
TM2
T2ST T2CN
TIMER 2
TIMER 3
CAP
2
T3SL
[1:0]
T3ST
T2SL[1:0]
0
0
1
1
0
0
1
1
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
01 or 10 or 11
8-bit Timer
reserved
8-bit Timer
8-bit Timer
01 or
10 or
11
00
01 or 10 or 11
00
8-bit Capture (internal clock) 8-bit Timer
8-bit Capture (external clock) 8-bit Timer
16-bit Timer
01 or 10 or 11
00
16-bit Event counter
00
01 or 10 or 11
00
16-bit Capture (internal clock)
16-bit Capture (external clock)
Table 11-2 TM2 Timer Mode Register
FEB. 2000 Ver 1.00
33