7643 Group
Rev.2.00
Aug 28, 2006
page 20 of 119
REJ03B0054-0200
INTERRUPTS
There are fourteen interrupt sources: three externals, ten internals,
and one software.
Interrupt Control
Each interrupt except the BRK instruction interrupt has both an Inter-
rupt Request Bit and an Interrupt Enable Bit, and is controlled by the
Interrupt Disable Flag (I). An interrupt occurs if the corresponding
Interrupt Request and Enable Bits are “1” and the Interrupt Disable
Flag is “0”.
Interrupt Enable Bits can be set or cleared by software. Interrupt Re-
quest Bits can be cleared by software, but cannot be set by software.
Additionally, an active edge of INT0 and INT1 can be selected by
using the interrupt polarity select register (address 001116).
The BRK instruction interrupt and reset cannot be disabled with any
flag or bit. The I Flag disables all interrupts except the BRK instruc-
tion interrupt and reset. If several interrupts requests occur at the
same time, the interrupt with the highest priority is accepted first.
Interrupt Operation
When an interrupt request occurs, the following operations are auto-
matically performed:
1. The processing being executed is stopped.
2. The contents of the program counter and processor status reg-
ister are automatically pushed onto the stack.
3. The Interrupt Disable Flag is set and the corresponding in-
terrupt request bit is cleared.
4. The interrupt jump destination address is read from the vector
table into the program counter.
sNotes
When setting the followings, the interrupt request bit may be set to
“1”.
When setting external interrupt active edge
Related register: Interrupt polarity select register (address 001116)
When not requiring for the interrupt occurrence synchronized with
these setting, take the following sequence.
Set the corresponding Interrupt Enable Bit to “0” (disabled).
Set the Interrupt Polarity Select Bit (Active Edge Switch Bit).
Set the corresponding Interrupt Request Bit to “0” after 1 or more
instructions have been executed.
Set the corresponding Interrupt Enable Bit to “1” (enabled).
Fig. 16 Interrupt control
Interrupt request bit
Interrupt enable bit
Interrupt disable flag (I)
BRK instruction
Reset
Interrupt request