
R01UH0336EJ0102 Rev.1.02
Page 40 of 1538
Jul 17, 2014
V850E2/PG4-L
Section 2 Port Functions
2.2.2
Pin Function Configuration
The pins can operate in three different general modes.
• Port mode (PMCn.PMCn_m = 0)
In port mode, the pin operates as a general purpose I/O port. PMn.PMn_m
selects input or output.
• Software I/O control alternative mode (PMCn.PMCn_m = 1,
PIPCn.PIPCn_m = 0)
In software I/O control alternative mode, the pin is operated by an
alternative function. The selection between input or output is done by
software via the PMn.PMn_m control bits.
• Direct I/O control alternative mode (PMCn.PMCn_m = 1,
PIPCn.PIPCn_m = 1)
In direct I/O control alternative mode, the pin operates for an alternative
function. In contrast to the software I/O control alternative mode, input or
output are also controlled by the hardware for the alternative function, so
software settings are not required for this.
An overview of the register settings is given in the tables below.
Note: The input buffer must be enabled. (PIBCn.PIBCn_m = 1)
Note: X: Invalid setting
If a pin is operated in an alternative mode (PMCn.PMCn_m = 1), one out of up
to four different alternative functions can be selected by the PFCn and PFCEn
registers.
• Software I/O control alternative functions (PIPCn.PIPCn_m = 0)
– Outputs (PMn_m = 0): ALT-OUT1 to ALT-OUT4
– Inputs (PMn_m = 1): ALT-IN1 to ALT-IN4
• Direct I/O control alternative functions (PIPCn.PIPCn_m = 1)
– Input/output of ALT-OUT1 to ALT-OUT4 and ALT-IN1 to ALT-IN4 is
directly controlled by the alternative function (hardware).
Table 2-3
Pin Function Configuration (Overview)
Function
Register
I/O
PMCn_m
PMn_m
PIPCn_m
Port mode (Output)
0
0
X
O
Port mode (Input)
1
*
I
Alternative output modes 1 to 4
1
0
0
O
Alternative input modes 1 to 4
1
0
I
Direct I/O control
X
1
Controlled by
alternative
function