Datasheet

V850ES/JG3-H, V850ES/JH3-H CHAPTER 4 PORT FUNCTIONS
R01UH0042EJ0500 Rev.5.00 Page 174 of 1513
Aug 12, 2011
Figure 4-4. Example of Switching from P02 to NMI (Incorrect)
PMC0
NMI interrupt occurrence
PMC0m bit = 0:
Port mode
PMC0m bit = 1:
Alternate-function mode
7
PMC02 bit = 0: Low level
PMC02 bit = 1: High level
6
Rising
edge
detector
543 2
P02/NMI
3 V
10
0
1
Remark m = 2 to 6
[Example 2] Switching from external pin (NMI) to general-purpose port (P02)
When the P02/NMI pin is pulled up as shown in Figure 4-5 and the falling edge is specified by
the NMI pin edge detection setting, even though a high level is input continuously to the NMI pin
when switching from the NMI pin to the P02 pin (PMC02 bit = 1 0), this is detected as a falling
edge as if a high level changed to a low level, and an NMI interrupt occurs.
To avoid this, set the NMI pin edge detection as “No edge detected” before switching to the P02
pin.
Figure 4-5. 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 = 2 to 6
(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.