GMS81508B HYNIX [Hynix Semiconductor], GMS81508B Datasheet - Page 42

no-image

GMS81508B

Manufacturer Part Number
GMS81508B
Description
HYUNDAI MICRO ELECTRONICS 8-BIT SINGLE-CHIP MICROCONTROLLERS
Manufacturer
HYNIX [Hynix Semiconductor]
Datasheet
HYUNDAI MicroElectronics
Note: The contents of Timer data register TDRx should be
initialized 1
set.
In the Timer 0, timer register T0 increments from 00
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-
Example 3:
Timer2 = 8-bit timer mode, 2ms interval at 8MHz
Timer3 = 8-bit timer mode, 500us interval at 8MHz
DEC. 1999 Ver 1.04
EC2 PIN
XIN PIN
H
LDM
LDM
LDM
SET1
SET1
EI
~FF
H
, not 0
TM2
TDR2,#250
TDR3,#250
TM2,#0110_1111B
T2E
T3E
Edge Detector
H
, because it is undefined after re-
CAP2
#16
#64
#4
7
0
#16
#64
#4
T2SL[1:0]
T3SL[1:0]
T3ST
01
10
11
00
01
10
11
X
6
MUX
MUX
T3SL1 T3SL0
Figure 11-3 8-bit Timer/Counter 2, 3
5
TIMER 2
TIMER 3
01 or 10 or 11
T2CN
4
H
until
BTCL
T2ST
X
3
T2CN
2
X
TDR2 (8-bit)
TDR3 (8-bit)
ing it as a Tx, written to TDRx.
In counter function, the counter is increased every 1-to-0
(falling edge) transition of EC0 or EC2 pin. In order to use
counter function, the bit 4, bit 5 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.
Similarly, Timer 2 can be used by pin EC2 input but Timer
3 can not.
Example 4:
Timer2 = 8-bit event counter mode
Timer3 = 500us 8-bit timer mode at 8MHz
T2SL1
T2 (8-bit)
T3 (8-bit)
X means don’t care
1
X
T2ST
T3ST
0: Stop
1: Clear and start
0: Stop
1: Clear and start
T2SL0
0
X
Comparator
Comparator
LDM
LDM
LDM
SET1
SET1
EI
clear
clear
ADDRESS: 0E3
INITIAL VALUE: 00
TDR2,#250
TDR3,#250
TM2,#0110_1100B
T2E
T3E
T2IF
T3IF
H
F/F
GMS81508B/16B/24B
H
TIMER 2
INTERRUPT
TIMER 3
INTERRUPT
T3O PIN
39

Related parts for GMS81508B