English
Language : 

GMS82524 Datasheet, PDF (39/93 Pages) Hynix Semiconductor – 8-BIT SINGLE-CHIP MICROCONTROLLERS
GMS82512/16/24
HYUNDAI MicroElectronics
Note: The contents of Timer data register TDRx should be
initialized 1H~FFH, not 0H, because it is undefined after re-
set.
In the Timer 0, timer register T0 increments from 00H until
it matches TDR0 and then reset to 00H. The match output
of Timer 0 generates Timer 0 interrupt (latched in T0IF bit)
As TDRx and Tx register are in same address, when read-
ing it as a Tx, written to TDRx.
In counter function, the counter is increased every 1-to-0
(falling edge) transition of EC0 pin. In order to use counter
function, the bit 4 of the Port mode register PMR4 are set
to “1”. The Timer 0 can be used as a counter by pin EC0
input, but Timer 1 can input by internal clock.
TM2
7
6
5
4
3
2
1
0
CAP2 T3ST T3SL1 T3SL0 BT2TSCTL T2CN T2SL1 T2SL0
ADDRESS: 0E3H
INITIAL VALUE: 00H
0
X
X
XX
X
01 or 10 or 11
X means don’t care
T2SL[1:0]
XIN PIN
Reserved
00
÷4
01
÷ 16
10
÷ 64
11
MUX
T2CN
TIMER 2
T2ST
0: Stop
1: Clear and start
T2 (8-bit)
clear
T2IF
Comparator
TDR2 (8-bit)
TIMER 2
INTERRUPT
T3SL[1:0]
÷4
01
÷ 16
10
÷ 64 11
MUX
TIMER 3
T3ST
0: Stop
1: Clear and start
T3 (8-bit)
clear
Comparator
TDR3 (8-bit)
T3IF
F/F
TIMER 3
INTERRUPT
T3O PIN
Figure 11-3 8-bit Timer/Counter 2, 3
Example 3:
Timer2 = 8-bit timer mode, 2ms interval at 8MHz
Timer3 = 8-bit timer mode, 500us interval at 8MHz
LDM
LDM
LDM
SET1
SET1
EI
TDR2,#250
TDR3,#250
TM2,#0110_1111B
T2E
T3E
Example 4:
Timer2 = 8-bit event counter mode
Timer3 = 500us 8-bit timer mode at 8MHz
LDM
LDM
LDM
SET1
SET1
EI
TDR2,#250
TDR3,#250
TM2,#0110_1100B
T2E
T3E
36
FEB. 2000 Ver 1.00