88
4.5.3
External Interrupts
There is one external interrupt source, the
INT
0 pin, in HD404344R and HD404394 Series
products, and there are two external interrupt sources, the
INT
0 and INT1 pins, in HD404318,
HD404358, HD404358R, HD404339, and HD404369 Series products. These external interrupts
are generated by falling edges on the corresponding
INT
0 and INT1 pins.
When an external interrupt occurs, the corresponding external interrupt request flag (IF0 or IF1) is
set to 1. These interrupts can be masked or enabled independently by the external interrupt masks
IM0 and IM1. Note that all interrupts are masked or enabled by the interrupt enable flag IE.
When an external interrupt is accepted, the IE flag is cleared to 0 by the hardware during interrupt
handling to disable the acceptance of other interrupts.
The
INT
0 interrupt has higher priority than the INT1 interrupt. Refer to table 4-3 for details.
4.5.4
Internal Interrupts
There are four internal interrupt sources from the built-in peripheral modules in the HD404344R
and HD404394 Series products: timer B, timer C, the A/D converter, and the serial interface.
There are five internal interrupt sources from the built-in peripheral modules in the HD404318,
HD404358, HD404358R, HD404339, and HD404369 Series products: timer A, timer B, timer C,
the A/D converter, and the serial interface.
When an internal interrupt occurs, the corresponding interrupt request flag (IF) is set to 1. These
interrupts can be masked or enabled independently by the interrupt masks (IM). Note that all
interrupts are masked or enabled by the interrupt enable flag IE.
When an internal interrupt is accepted, the IE flag is cleared to 0 by the hardware during interrupt
handling to disable the acceptance of other interrupts.
Refer to table 4-3 for details on the priority of internal interrupts.