
2-7
APPLICATION
2.1 I/O port
3874 Group User's Manual
(4)
Notes in standby state
In stand-by state*1 for low-power dissipation, do not make input levels of an input port and an I/O
port “undefined”, especially for I/O ports of the N-channel open-drain.
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
When using built-in pull-up resistor, note on varied current values:
When setting as an input port : Fix its input level
When setting as an output port : Prevent current from flowing out to external
q Reason
Even when setting as an output port with its direction register, in the following state :
P-channel......when the content of the port latch is “0”
N-channel......when the content of the port latch is “1”
the transistor becomes the OFF state, which causes the ports to be the high-impedance state.
Note that the level becomes “undefined” depending on external circuits.
Accordingly, the potential which is input to the input buffer in a microcomputer is unstable in the
state that input levels of a input port and an I/O port are “undefined”. This may cause power
source current.
*1 stand-by state : the stop mode by executing the STP instruction
the wait mode by executing the WIT instruction
(5)
Notes on external circuit design for I/O ports
When designing an external circuit for I/O ports, be sure to set the following items within the standard
value range.
Total average output current
Peak output current
Average output current
When performing multiple key-input operations by forming a key matrix, design in consideration of
the port input current due to multiple key-input operations.
Figure 2.1.5 shows the example of external circuit design for I/O port.
3874 group
P00
R0 = 600
IOL0 = 5 mA
P02
P01
R1 = 600
R2 = 600
IOL2 = 5 mA
IOL1 = 5 mA
10 ms
VCC = 5 V
“L” total average output
current
IOL0
+ IOL1 + IOL2 = 15 mA <
Maximum standard value
40 mA
“L” peak output current
IOL0
= IOL1 = IOL2 = 5 mA
< 10 mA
“L” average output current (within 100 ms)
5 mA ! 10 ms ! 5
= 2.5 mA <
100 ms
5 mA
V
V: LED (VF= 2 V) used
Ports P00 – P02
Timing of LED On
(duty ratio: 50 %)
Fig. 2.1.5 Example of external circuit design for I/O port