NEC V850ES/SA2 UPD703201 Manual page 105

32-bit single-chip microcontrollers
Table of Contents

Advertisement

(2) Registers
(a) Port register 2 (P2)
Port register 2 (P2) is an 8-bit register that controls reading the pin level and writing the output level. This
register can be read or written in 8-bit or 1-bit units.
After reset: Undefined
P2
0
P2n
0
1
Remarks 1. In input mode: When port 2 (P2) is read, the pin level at that time is read. When written, the
In output mode: When port 2 (P2) is read, the value of P2 is read. When a value is written to P2,
2. After reset, an undefined value (pin input level) is read from P2 in the input mode. When P2 is
read in the output mode, 00H (value of the output latch) is read.
(b) Port mode register 2 (PM2)
This is an 8-bit register that specifies the input or output mode.
This register can be read or written in 8-bit or 1-bit units.
After reset:
FFH
PM2
1
PM2n
0
1
CHAPTER 4 PORT FUNCTIONS
R/W
Address:
FFFFF404H
0
0
0
Controls output data (in output mode) (n = 0 to 2)
Outputs 0.
Outputs 1.
data written to P2 is written. The input pin is not affected.
it is immediately output.
R/W
Address:
FFFFF424H
1
1
1
Controls input/output mode (n = 0 to 2)
Output mode
Input mode
Preliminary User's Manual U15905EJ1V0UD
0
P22
P21
1
PM22
PM21
PM20
P20
105

Advertisement

Table of Contents
loading

Table of Contents