
CHAPTER 4 PORT FUNCTIONS
User’s Manual U15905EJ2V1UD
99
4.3.2
Port 2
Port 2 can be set to the input or output mode in 1-bit units.
The number of I/O port bits differs depending on the product.
Commercial Name
Number of I/O Port Bits
V850ES/SA2
V850ES/SA3
3-bit I/O port
(1) Functions of port 2 (V850ES/SA3)
Input/output data can be specified in 1-bit units by using port register 2 (P2).
Can be set to the input or output mode in 1-bit units by using port mode register 2 (PM2).
Can be set to the port mode or control mode (alternate function) in 1-bit units by using port mode control
register 2 (PMC2).
N-ch open-drain output can be set in 1-bit units by using port function register 2 (PF2).
An internal pull-up resistor can be connected in 1-bit units by using pull-up resistor option register 2 (PU2).
Port 2 has an alternate function as the following pins.
Table 4-5. Alternate-Function Pins of Port 2 (V850ES/SA3)
Pin Name
Alternate-Function Pin
I/O
PULL
Note
Remark
P20
SI4
P21
SO4
Port 2
P22
SCK4
I/O
Provided
N-ch open-drain output selectable
Note
Software pull-up function