English
Language : 

HMS87C1808B Datasheet, PDF (68/99 Pages) List of Unclassifed Manufacturers – 8-BIT SINGLE-CHIP MICROCONTROLLERS
HMS87C1X04B/08B/16B
16.4 External Interrupt
The external interrupt on INT0, INT1, INT2 and INT3 pins are
edge triggered depending on the edge selection register IEDS (ad-
dress 0E6H) as shown in Figure 16-6 .
The edge detection of external interrupt has three transition acti-
vated mode: rising edge, falling edge, and both edge.
INT0 pin
INT1 pin
INT2 pin
Noise Canceller
Noise Canceller
Noise Canceller
INT0IF
INT0 INTERRUPT
INT1IF
INT1 INTERRUPT
INT2IF
INT2 INTERRUPT
INT3 pin
Noise Canceller
INT3IF
INT3 INTERRUPT
IEDS
[0E6H]
Figure 16-6 External Interrupt Block Diagram
Example: To use as an INT0 and INT2
Ext. Interrupt Edge Selection
Register
W WW W
IESR
ADDRESS : 0E6H
RESET VALUE : 0000_0000
W WW W
INT2 edge select
00 : Int. disable
01 : falling
10 : rising
11 : both
INT3 edge select
00 : Int. disable
01 : falling
10 : rising
11 : both
INT0 edge select
00 : Int. disable
01 : falling
10 : rising
11 : both
INT1 edge select
00 : Int. disable
01 : falling
10 : rising
11 : both
:
:
;**** Set port as an input port RB2,RD0
LDM RBIO,#1111_1011B
LDM RDIO,#1111_1110B
;
;**** Set port as an interrupt port
LDM RBFUNC,#04H
LDM RDFUNC,#01H
;
;**** Set Falling-edge Detection
LDM IEDS,#0001_0001B
:
:
:
Response Time
The INT0, INT1,INT2 and INT3 edge are latched into INT0IF,
INT1IF, INT2IF and INT3IF at every machine cycle. The values
are not actually polled by the circuitry until the next machine cy-
cle. If a request is active and conditions are right for it to be ac-
knowledged, a hardware subroutine call to the requested service
routine will be the next instruction to be executed. The DIV itself
takes twelve cycles. Thus, a minimum of twelve complete ma-
chine cycles elapse between activation of an external interrupt re-
quest and the beginning of execution of the first instruction of the
service routine.
64
SEP. 2004 Ver 1.03