
R01UH0336EJ0102 Rev.1.02
Page 44 of 1538
Jul 17, 2014
V850E2/PG4-L
Section 2 Port Functions
• PMCn.PMCn_m
This bit selects port mode (PMCn_m = 0) or alternative mode
(PMCn_m = 1).
• PMn.PMn_m
This bit selects input (PMn_m = 1) or output (PMn_m = 0) in port mode
(PMCn_m = 0) and software I/O control alternative function mode
(PMCn_m = 1, PIPCn_m = 0).
• PIBCn.PIBCn_m
This bit disables (PIBCn_m = 0) or enables (PIBCn_m = 1) the input buffer
in input port mode (PMCn_m = 0 and PMn_m = 1). If the input buffer is
disabled, PPRn_m reads the Pn.Pn_m bit, otherwise the Pn_m pin level is
returned.
• PIPCn.PIPCn_m
This bit selects between the software I/O control alternative function mode
and direct I/O control alternative function.
Pn register write
The data to be output via port Pn_m in port mode (PMCn.PMCn_m = 0) is held
in the port register Pn. The Pn data can be manipulated in two different ways:
• Direct Pn write
New data can be written directly to the Pn register.
• Indirect Pn bit set/reset/not
An indirect way to set (Pn_m = 1), reset (Pn_m = 0), or invert (Pn_m
Pn_m) a Pn bit is possible using the following two registers:
– Port set reset register PSRn
If the bit PSRn.PSRn_(m+16) = 1, the value of bit PSRn.PSRn_m
determines the value of Pn.Pn_m. Thus Pn_m can be set/reset without a
direct write to Pn.
– Port NOT register PNOTn
Setting PNOTn.PNOTn_m = 1 inverts the bit Pn.Pn_m without a direct
write to Pn_m.
Access to single bits of the Pn register is possible so that operations to
manipulate (set, reset, ) bits for the Pn register do not indirectly affect any of
the other Pn_m bits.
Take care because the simultaneous use of both methods to manipulate Pn_m
bits is possible.
Caution
When the following conditions are satisfied, the output on the Pn_m pin (e.g.
ALT_OUTx) reflects the internal level of a multiplexed input function (e.g.
ALT_INx).
An output function (e.g. ALT_OUTx) is multiplexed with an input function
(e.g. ALT_INx).
The pin is in use for the multiplexed output function (PMCn.PMCn_m = 1
and PMn.PMn_m = 0).
Enabling of the bi-directional mode (PBDCn.PBDCn_m = 1) leads to the
level on Pn_m being readable from PPRn.PPRn_m.