
CHAPTER 4 PORT FUNCTIONS
User’s Manual U15905EJ2V1UD
153
(2) Registers
(a) Port register CS (PCS)
Port register CS (PCS) 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.
PCS7Note
Outputs 0.
Outputs 1.
PCSn
0
1
Controls output data (in output mode) (V850ES/SA2: n = 0 to 3, V850ES/SA3: n = 0 to 7)
PCS
PCS6Note PCS5Note PCS4Note
PCS3
PCS2
PCS1
PCS0
After reset: Undefined
R/W
Address: FFFFF008H
Note
Bits 7 to 4 are provided in the V850ES/SA3 only. Be sure to clear these bits to 0 in the V850ES/SA2.
Remarks 1. In input mode:
When port CS (PCS) is read, the pin level at that time is read. When written, the
data written to PCS is written. The input pin is not affected.
In output mode: When port CS (PCS) is read, the value of PCS is read. When a value is written
to PCS, it is immediately output.
2. After reset, an undefined value (pin input level) is read from PCS in the input mode. When PCS is
read in the output mode, 00H (value of the output latch) is read.
(b) Port mode register CS (PMCS)
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.
PMCS7Note
Output mode
Input mode
PMCSn
0
1
Controls input/output mode (V850ES/SA2: n = 0 to 3, V850ES/SA3: n = 0 to 7)
PMCS
PMCS6Note PMCS5Note PMCS4Note
PMCS3
PMCS2
PMCS1
PMCS0
After reset: FFH
R/W
Address: FFFFF028H
Note
Bits 7 to 4 are provided in the V850ES/SA3 only. Be sure to set these bits to 1 in the V850ES/SA2.