English
Language : 

M38203M4 Datasheet, PDF (300/344 Pages) Mitsubishi Electric Semiconductor – 8-BIT SINGLE-CHIP MICROCOMPUTER
APPENDIX
3.3 Control registers
3.3 Control registers
Port P0 direction register, port P1 direction register
b7 b6 b5 b4 b3 b2 b1 b0
Port P0 direction register (P0D) [Address 0116]
Port P1 direction register (P1D) [Address 0316]
B
Name
0 Port P0 direction
register /
Port P1 direction
register
Functions
At reset R W
0 : All bits are input mode
1 : All bits are output mode
0×
1 Nothing is allocated. These bits cannot be written
to to and be read out.
7
0 ××
Note: In ports P0 and P1, input/output switching is performed by a port unit.
By setting bit 0 of the corresponding port direction register to “0”, the
port is set for the input mode. By setting to “1”, the port is set for the
output mode. Nothing is allocated for bits 1 to 7 of the ports P0 and
P1 direction registers, and these bits cannot be written to.
Fig. 3.3.1 Structure of port P0 and P1 direction registers
Port Pi direction register
b7 b6 b5 b4 b3 b2 b1 b0
Port Pi direction register (PiD) (i = 2, 4 to 7)
[Address 0516, 0916, 0B16, 0D16, 0F16]
B
Name
0 Port Pi direction
register
1
2
3
4
5
6
7
Functions
0 : Port Pi0 input mode
1 : Port Pi0 output mode
0 : Port Pi1 input mode
1 : Port Pi1 output mode
0 : Port Pi2 input mode
1 : Port Pi2 output mode
0 : Port Pi3 input mode
1 : Port Pi3 output mode
0 : Port Pi4 input mode
1 : Port Pi4 output mode
0 : Port Pi5 input mode
1 : Port Pi5 output mode
0 : Port Pi6 input mode
1 : Port Pi6 output mode
0 : Port Pi7 input mode
1 : Port Pi7 output mode
At reset R W
0
×
0
×
0
×
0
×
0
×
0
×
0
×
0
×
Notes 1: Nothing is allocated bit 0 of port P4 direction register and bit 2
to bit 7 of port P7 direction register. These bits cannot be written
to.
2: The contents of the port Pi direction register cannot be read out
(refer to “2.1.4 Notes on use”).
Fig. 3.3.2 Structure of port Pi (i = 2, 4 to 7) direction registers
3–16
3820 GROUP USER’S MANUAL