External Interrupt - Abov MC80F0304 User Manual

8-bit single-chip microcontrollers
Table of Contents

Advertisement

MC80F0304/08/16
interrupt can be serviced even if certain interrupt is in progress.
Main Program
service
TIMER 1
service
enable INT0
INT0
service
disable other
EI
Occur
Occur
In this example, the INT0 interrupt can be serviced without any
TIMER1 interrupt
INT0
pending, even TIMER1 is in progress.
Because of re-setting the interrupt enable registers IENH,IENL
and master enable "EI" in the TIMER1 routine.
enable INT0
enable other
Figure 18-6 Execution of Multi Interrupt
Example: During Timer1 interrupt is in progress, INT0 interrupt
:
serviced without any suspend.
:
TIMER1: CLR1
PUSH
T1IF
A
;Clear Timer1 Request
:
:
PUSH
PUSH
X
Y
LDM
LDM
IENH,#0FFH ;Enable all interrupts
IENL,#0FFH
LDM
IENH,#80H
;Enable INT0 only
POP
Y
EI
LDM
IENL,#0
;Disable other int.
;Enable Interrupt
POP
POP
A
X
:
:
RETI

18.4 External Interrupt

The external interrupt on INT0, INT1, INT2 and INT3 pins are
The edge detection of external interrupt has three transition acti-
edge triggered depending on the edge selection register IEDS (ad-
vated mode: rising edge, falling edge, and both edge.
dress 0EE
H
) as shown in Figure 18-7 .
November 4, 2011 Ver 2.12
99

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents