
CHAPTER 4 PORT FUNCTIONS
User’s Manual U15905EJ2V1UD
144
(2) Registers
(a) Port register CD (PCD)
Port register CD (PCD) 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.
PCDn
0
1
Controls output data (in output mode) (n = 1 to 3)
PCD
0
PCD3
PCD2
PCD1
0
After reset: Undefined
R/W
Address: FFFFF00EH
Remarks 1. In input mode:
When port CD (PCD) is read, the pin level at that time is read. When written, the
data written to PCD is written. The input pin is not affected.
In output mode: When port CD (PCD) is read, the value of PCD is read. When a value is written
to PCD, it is immediately output.
2. After reset, an undefined value (pin input level) is read from PCD in the input mode. When PCD is
read in the output mode, 00H (value of the output latch) is read.
(b) Port mode register CD (PMCD)
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
PMCDn
0
1
Controls input/output mode (n = 1 to 3)
PMCD
1
PMCD3
PMCD2
PMCD1
1
After reset: FFH
R/W
Address: FFFFF02EH