CHAPTER 4 PORT FUNCTIONS
Preliminary User’s Manual U15905EJ1V0UD
105
(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.
0
Outputs 0.
Outputs 1.
P2n
0
1
Controls output data (in output mode) (n = 0 to 2)
P2
0
0
0
0
P22
P21
P20
After reset: Undefined
R/W
Address:
FFFFF404H
Remarks 1.
In input mode: When port 2 (P2) is read, the pin level at that time is read. When written, the
data written to P2 is written. The input pin is not affected.
In output mode: When port 2 (P2) is read, the value of P2 is read. When a value is written to P2,
it is immediately output.
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.
1
Output mode
Input mode
PM2n
0
1
Controls input/output mode (n = 0 to 2)
PM2
1
1
1
1
PM22
PM21
PM20
After reset:
FFH R/W
Address:
FFFFF424H
Содержание V850ES/SA2 UPD703201
Страница 2: ...Preliminary User s Manual U15905EJ1V0UD 2 MEMO ...
Страница 284: ... 4 6 7 6 7 8 9 9 6 Note 1 Note 2 0 0 9 9 6 1 1 0 1 9 0 0 0 6 7 0 0 0 0 0 0 0 1 1 1 0 0 0 0 3 1 6 7 6 7 ...
Страница 285: ... 6 7 ...
Страница 516: ...Preliminary User s Manual U15905EJ1V0UD 516 MEMO ...