369
CHAPTER 15 EDGE DETECTION FUNCTION
15.4 Cautions
(1) Valid edge detection cannot be performed when the valid edge is changed by a write to the external interrupt mode
register (INTMn: n = 0, 1). Also, if an edge is input during a change of the valid edge, that edge may or may not
be judged to be a valid edge.
(2) After checking the flag by using the interrupt valid edge flag register (IEFn: n = 1, 2), clear the flag to “0” by software.
(3) The interrupt valid edge flag register (IEFn: n = 1, 2) indicates that an edge has been generated, and has nothing
to do with specification of a valid edge. For example, if the valid edge of the INTP0 pin is specified to be the rising
edge, and if the falling edge is generated, the interrupt request signal is not generated, but the IEFL0 flag is set to
“1”.
(4) If the INTPn (n = 0 to 6) pin is “1” after the reset signal has been deasserted, the rising edge is recognized, and the
IEFHn (n = 0 to 6) flag of the interrupt valid edge flag register (IEFn: n = 1, 2) is set to “1”. Even when the IEFHn
flag is used as a digital port (P21 to P27), it may be set (1). Be sure to clear (0) the IEFHn flag before checking
the edge of an external interrupt.
(5) Since analog delay noise elimination is performed on pin P20 an edge is detected up to 10 ms after it is actually
input. Also, unlike pins P21 to P27, the delay before an edge is detected is not a specific value, because of differences
in the characteristics of various devices.
(6) Since digital noise elimination is performed on pins P21 to P27 with the f
CLK
clock, there is a delay of 4 f
CLK
clocks
between input of an edge to the pin and the point at which the edge is actually detected.
(7) If the input pulse width on pins P21 to P27 is 4 f
CLK
clocks, it is uncertain whether a valid edge will be detected or
not. Therefore, to ensure reliable operation, the period of at least 4 clocks and the level must be fixed.
(8) If noise input to pins P21 to P27 is synchronized with the f
CLK
clock in the
m
PD784046, it may not be recognized as
noise. If there is a possibility of such noise being input, noise should be eliminated by adding a filter to the input
pins.