CHAPTER 4 PORT FUNCTIONS
User’s Manual U16896EJ2V0UD
77
(8) Port
settings
Set the ports as follows.
Figure 4-1. Register Settings and Pin Functions
PMCn register
Output mode
Input mode
PMn register
“
0
”
“
1
”
“
0
”
“
1
”
“
0
”
“
1
”
(a)
(b)
(c)
(d)
Alternate function
(when two alternate
functions are available)
Port mode
Alternate function 1
Alternate function 2
PFCn register
Alternate function
(when three or more alternate
functions are available)
Alternate function 1
Alternate function 2
Alternate function 3
Alternate function 4
PFCn register
PFCEn register
PFCEnm
0
1
0
1
0
0
1
1
(a)
(b)
(c)
(d)
PFCnm
Remark
Switch to the alternate function using the following procedure.
<1> Set the PFCn and PFCEn registers.
<2> Set the PMCn register.
<3> Set the INTRn or INTFn register (to specify an external interrupt pin).
If the PMCn register is set first, an unintended function may be set while the PFCn and PFCEn
registers are being set.