![Hynix Semiconductor GMS81C5108 User Manual Download Page 72](http://html1.mh-extra.com/html/hynix-semiconductor/gms81c5108/gms81c5108_user-manual_2192989072.webp)
GMS81C5108
JUNE 2001 Ver 1.0
69
17.4 External Interrupt
The external interrupt on INT0, INT1 and INT2 pins are
edge triggered depending on the edge selection register
IESR (address 0D8
H
) as shown in Figure 17-6.
The edge detection of external interrupt has three transition
activated mode: rising edge, falling edge, and both edge.
Figure 17-6 External Interrupt Block Diagram
Example: To use as an INT0 and INT2
:
:
;
**** Set port as an input port R0
LDM
R0DR,#1111_1010B
;
;
**** Set port as an interrupt port
LDM
PMR,#0000_0101B
;
;
**** Set Falling-edge Detection
LDM
IESR,#0001_0001B
:
:
:
Response Time
The INT0, INT1 and INT2 edge are latched into INT0F,
INT1F and INT2F at every machine cycle. The values are
not actually polled by the circuitry until the next machine
cycle. If a request is active and conditions are right for it to
be acknowledged, a hardware subroutine call to the re-
quested service routine will be the next instruction to be
executed. The DIV itself takes twelve cycles. Thus, a max-
imum of twelve complete machine cycles elapse between
activation of an external interrupt request and the begin-
ning of execution of the first instruction of the service rou-
tine.
Interrupt response timings are shown in Figure 17-7.
Figure 17-7 Interrupt Response Timing Diagram
INT0IF
INT0
INT0 INTERRUPT
INT1IF
INT1
INT1 INTERRUPT
INT2IF
INT2
INT2 INTERRUPT
IESR
[0D8
H
]
edge
sele
c
tion
IESR (Ext. Interrupt Edge Selection Register)
ADDRESS : 0D8
H
RESET VALUE : --000000
B
INT21
INT2[1:0] (INT2 Edge Selections)
Bit : 7 6 5 4 3 2 1 0
R/W
R/W
R/W
R/W
R/W
R/W
INT20
INT10
INT11
INT01
INT00
00 : Int. Disable
01 : Falling (1-to-0 transition)
10 : Rising (0-to-1 transition)
11 : Both (Rising & Falling)
INT1[1:0] (INT1 Edge Selection)
00 : Int. Disable
01 : Falling (1-to-0 transition)
10 : Rising (0-to-1 transition)
11 : Both (Rising & Falling)
INT0[1:0] (INT0 Edge Selections)
00 : Int. Disable
01 : Falling (1-to-0 transition)
10 : Rising (0-to-1 transition)
11 : Both (Rising & Falling)
-
-
Interrupt Edge Selection Register)
Interrupt
goes
active
Interrupt
latched
Interrupt
processing
Interrupt
routine
8 f
OSC
max. 12 f
OSC
Downloaded from
Elcodis.com
electronic components distributor