![](http://datasheet.mmic.net.cn/30000/M38507F8FP_datasheet_2360437/M38507F8FP_239.png)
3850 Group (Spec. H) User’s Manual
3-31
APPENDIX
3.3 Notes on use
3.3.1 Notes on input and output ports
(1)
Notes in standby state
In standby state1, do not make input levels of an I/O port “undefined”, especially for I/O ports of the
N-channel open-drain. When setting the N-channel open-drain port as an output, do not make input
levels of an I/O port “undefined”, too.
Pull-up (connect the port to VCC) or pull-down (connect the port to VSS) these ports through a
resistor.
When determining a resistance value, note the following points:
External circuit
Variation of output levels during the ordinary operation
q Reason
When setting as an input port with its direction register, the transistor becomes the OFF state,
which causes the ports to be the high-impedance state.
Accordingly, the potential which is input to the input buffer in a microcomputer is unstable in the
state that input levels of an I/O port are “undefined”. This may cause power source current.
In I/O ports of N-channel open-drain, when the contents of the port latch are “1”, even if it is set
as an output port with its direction register, it becomes the same phenomenon as the case of an
input port.
1 standby state: stop mode by executing STP instruction
wait mode by executing WIT instruction
(2)
Modifying output data with bit managing instruction
When the port latch of an I/O port is modified with the bit managing instruction2, the value of the
unspecified bit may be changed.
q Reason
The bit managing instructions are read-modify-write form instructions for reading and writing data
by a byte unit. Accordingly, when these instructions are executed on a bit of the port latch of an
I/O port, the following is executed to all bits of the port latch.
As for bit which is set for input port:
The pin state is read in the CPU, and is written to this bit after bit managing.
As for bit which is set for output port:
The bit value is read in the CPU, and is written to this bit after bit managing.
Note the following:
Even when a port which is set as an output port is changed for an input port, its port latch holds
the output data.
As for a bit of which is set for an input port, its value may be changed even when not specified
with a bit managing instruction in case where the pin state differs from its port latch contents.
2 Bit managing instructions: SEB and CLB instructions