English
Language : 

M38203M4 Datasheet, PDF (88/344 Pages) Mitsubishi Electric Semiconductor – 8-BIT SINGLE-CHIP MICROCOMPUTER
APPLICATION
2.1 I/O pins
2.1 I/O pins
2.1.1 I/O ports
(1) I/O port write and read
sThe input-only ports and programmable I/O ports set for the input mode
The input-only ports and the programmable I/O ports set for the input mode are floating. The value
(pin state) input to the port is read by reading the port register corresponding to each port.
In writing data into the port register corresponding to each port, the data is only written to the port
register but the pin remains in the floating state.
sOutput-only ports and programmable I/O ports set for the output mode
The value written to the port register corresponding to an output port or a programmable I/O port set
for the output mode is output externally through a transistor.
In reading the data of the port transistor corresponding to each port, the pin state is not read but the
value written to the port register is read. Accordingly, even if the output “H” voltage is reduced or the
output “L” voltage is increased by external load, the previous output value is correctly read.
At output : •An output value is set by writing to the
port register.
•Reading a port register is possible.
At input : •Writing to a port register is possible.
•A pin state is read by reading the
port register.
Port direction
register
(“1”)
“H” level output
Port direction
registerV
(“0”)
Port
register
Port register
(at writing)
“L” level output
Port register
(at reading)
Read the pin state
V : The P- and N-channel transistors are cut off.
Fig. 2.1.1 I/O port write and read
2–2
3820 GROUP USER’S MANUAL