3.2.2 Individual interrupt enable flags (EF23 to EF4)
Each of these flags enables and disables the acceptance of its maskable interrupt. Setting the corresponding
bit of an individual interrupt enable flag to "1" enables acceptance of its interrupt, and setting the bit to "0" dis-
ables acceptance. During reset, all the individual interrupt enable flags (EF23 to EF4) are initialized to "0" and
all maskable interrupts are not accepted until they are set to "1".
Note:In main program, before manipulating the interrupt enable flag (EF) or the interrupt latch (IL), be sure to clear
IMF to "0" (Disable interrupt by DI instruction). Then set IMF newly again as required after operating on the EF
or IL (Enable interrupt by EI instruction)
In interrupt service routine, because the IMF becomes "0" automatically, clearing IMF need not execute nor-
mally on interrupt service routine. However, if using multiple interrupt on interrupt service routine, manipulat-
ing EF or IL should be executed before setting IMF="1".
Example 1 :Enables interrupts individually and sets IMF
Example 2 :C compiler description example
DI
LDW
(EIRL), 1110100010100000B
:
:
EI
unsigned int _io (3AH) EIRL;
_DI();
EIRL = 10100000B;
:
_EI();
Page 37
←
; IMF
0
←
; EF15 to EF13, EF11, EF7, EF5
Note: IMF should not be set.
←
; IMF
1
/* 3AH shows EIRL address */
T5CL8
1