
CHAPTER 19 INTERRUPT FUNCTIONS
401
User
’
s Manual U14260EJ3V1UD
(1) Interrupt request flag registers (IF0L, IF0H, IF1L)
An interrupt request flag is set to 1 when the corresponding interrupt request is generated or an instruction is
executed. It is cleared to 0 when an instruction is executed upon acknowledgment of an interrupt request or upon
RESET input.
When an interrupt is acknowledged, the interrupt request flag is automatically cleared, and then the interrupt
routine is executed.
IF0L, IF0H, and IF1L are set by a 1-bit or 8-bit memory manipulation instruction. When IF0L and IF0H are
combined to form 16-bit register IF0, they are read by a 16-bit memory manipulation instruction.
RESET input clears IF0L, IF0H, and IF1L to 00H.
Figure 19-2. Format of Interrupt Request Flag Register (IF0L, IF0H, IF1L)
Address: FFE0H After reset: 00H R/W
Symbol
7
6
5
4
3
2
1
0
IF0L
STIF0
SRIF0
SERIF0
PIF3
PIF2
PIF1
PIF0
WDTIF
Address: FFE1H After reset: 00H R/W
Symbol
7
6
5
4
3
2
1
0
IF0H
TMIF51
TMIF50
TMIF010
TMIF000
WTIIF0
IICIF0
Note
CSIIF3
CSIIF1
Address: FFE2H After reset: 00H R/W
Symbol
7
6
5
4
3
2
1
0
IF1L
TMIF011
TMIF001
STIF2
SRIF2
SERIF2
KRIF
WTIF
ADIF0
XXIFX
Interrupt request flag
0
No interrupt request signal is generated
1
Interrupt request signal is generated, interrupt request status
Note
Incorporated only in the
μ
PD780078Y Subseries. Be sure to set 0 for the
μ
PD780078 Subseries.
Cautions 1. The WDTIF flag is R/W enabled only when the watchdog timer is used as an interval timer.
If watchdog timer mode 1 is used, set the WDTIF flag to 0.
2. When operating a timer, serial interface, or A/D converter after standby release, operate it
after clearing the interrupt request flag, because interrupt request flags may be set by noise.
3. When manipulating a flag of the interrupt request flag register, use a 1-bit memory
manipulation instruction (CLR1). When describing in C language, use a bit manipulation
instruction such as “IF0L.0 = 0;” or “_asm(“clr1 IF0L, 0”);” because the compiled assembler
must be a 1-bit memory manipulation instruction (CLR1).
If a program is described in C language using an 8-bit memory manipulation instruction
such as “IF0L &= 0xfe;” and compiled, it becomes the assembler of three instructions.
mov a, IF0L
and a, #0FEH
mov IF0L, a
In this case, even if the request flag of another bit of the same interrupt request flag register
(IF0L) is set to 1 at the timing between “mov a, IF0L” and “mov IF0L, a”, the flag is cleared
to 0 at “mov IF0L, a”. Therefore, care must be exercised when using an 8-bit memory
manipulation instruction in C language.