CHAPTER 5 INTERRUPT/EXCEPTION PROCESSING FUNCTION
User’s Manual U13850EJ4V0UM
145
5.3.9 Edge detection function
Valid edges of the INTP0 to INTP6 pins can be selected for each pin from the following four types.
• Rising edge
• Falling edge
• Both rising and falling edges
• Detects neither rising nor falling edge
The validity of the rising edge is controlled by rising edge specification register 0 (EGP0), and the validity of the
falling edge is controlled by falling edge specification register 0 (EGN0). Refer to
Figures 5-5
and
5-6
for details of
EGP0 and EGN0.
After reset, the valid edge of the NMI pin is set to the “detects neither rising nor falling edge” state. Therefore, the
NMI pin functions as a normal port and an interrupt request cannot be acknowledged, unless a valid edge is specified
by using the EGP0 and EGN0 registers.
When using P01 to P07 as output ports, set valid edges of INTP0 to INTP6 to “detects neither rising nor falling
edge” or mask the interrupt request.