Datasheet

V850ES/JG3 CHAPTRER 4 PORT FUNCTIONS
R01UH0015EJ0300 Rev.3.00 Page 146 of 870
Sep 30, 2010
Figure 4-33. Example of Switching from P02 to NMI (Incorrect)
PMC0
NMI interrupt occurrence
76543 2
P02/NMI
3 V
10
0
1
PMC0m bit = 0:
Port mode
PMC0m bit = 1:
Alternate-function mode
Rising
edge
detector
PMC02 bit = 0: Low level
PMC02 bit = 1: High level
Remark m = 0 to 7
[Example 2] Switch from external pin (NMI) to general-purpose port (P02)
When the P02/NMI pin is pulled up as shown in Figure 4-34 and the falling edge is specified in
the NMI pin edge detection setting, even though high level is input continuously to the NMI pin at
switching from the NMI pin to the P02 pin (PMC02 bit = 1 0), this is detected as falling edge
as if high level changed to low level, and NMI interrupt occurs.
To avoid this, set the NMI pin edge detection as “No edge detected” before switching to the P02
pin.
Figure 4-34. Example of Switching from NMI to P02 (Incorrect)
PMC0
76543 2
P02/NMI
3 V
10
NMI interrupt occurrence
1
0
PMC0m bit = 0:
Port mode
PMC0m bit = 1:
Alternate-function mode
Falling
edge
detector
PMC02 bit = 1: High level
PMC02 bit = 0: Low level
Remark m = 0 to 7
(2) In port mode, the PFn.PFnm bit is valid only in the output mode (PMn.PMnm bit = 0). In the input mode (PMnm bit
= 1), the value of the PFnm bit is not reflected in the buffer.