CHAPTER 7 INTERRUPT/EXCEPTION PROCESSING FUNCTION
User’s Manual U15109EJ3V0UD
240
7.3.9 Edge detection function
Valid edges of the INTP0 to INTP9 pins can be selected for each pin from the following four types.
•
Rising edge
•
Falling edge
•
Both rising and falling edges
•
Neither rising nor falling edge detected
The validity of the rising edge is controlled by rising edge specification register n (EGPn), and the validity of the
falling edge is controlled by falling edge specification register n (EGNn) (n = 0, 1). These can be read/written in 8- or
1-bit units. Refer to
7.2.5 (1) Format of rising edge specification register 0 (EGP0)
and
7.2.5 (2) Format of
falling edge specification register 0 (EGN0)
for details of EGP0 and EGN0 and
(1) Format of rising edge
specification register 1 (EGP1)
and
(2) Format of falling edge specification register 1 (EGN1)
for details of
EGP1 and EGN1.
After reset, the valid edges of the INTP0 to INTP9 pins are set to the “neither rising nor falling edge detected”
state. Therefore, the NMI pin functions as a normal port and interrupt requests cannot be acknowledged, unless a
valid edge is specified by using the EGP0 and EGN0 registers.
When using P01 to P07 or P35 to P37 as output ports, set the valid edges of INTP0 to INTP6 or INTP7 to INTP9
to “neither rising nor falling edge detected” or mask interrupt requests.
(1) Format of rising edge specification register 1 (EGP1)
After reset: 00H
R/W
Address: FFFFF0C4H
Symbol
<7>
<6>
<5>
4
3
2
1
0
EGP1
EGP17
EGP16
EGP15
0
0
0
0
0
EGP1n
Rising edge validity control
0
No interrupt request signal occurs at the rising edge
1
Interrupt request signal occurs at the rising edge
n = 5 to 7: Control of INTP7 to INTP9 pins
(2) Format of falling edge specification register 1 (EGN1)
After reset: 00H
R/W
Address: FFFFF0C6H
Symbol
<7>
<6>
<5>
4
3
2
1
0
EGN1
EGN17
EGN16
EGN15
0
0
0
0
0
EGN1n
Falling edge validity control
0
No interrupt request signal occurs at the falling edge
1
Interrupt request signal occurs at the falling edge
n = 5 to 7: Control of INTP7 to INTP9 pins