English
Language : 

M38203M4 Datasheet, PDF (94/344 Pages) Mitsubishi Electric Semiconductor – 8-BIT SINGLE-CHIP MICROCOMPUTER
APPLICATION
2.1 I/O pins
2.1.3 Application examples
The basic structure for key input without a pull-up resistor and an application examples of it are described
below.
In contrast to a method which uses a pull-up resistor, dissipating current incessantly, this method requires
only a charging current for a very small capacitance, so it is especially suitable for a battery-driven unit.
In the following description, ports A, B, C and D are only tentative names and differ from the real port
names.
(1) Basic structure for key input
Figure 2.1.7 shows a connection example 1 for
key input without a pull-up resistor and Figure
2.1.8 shows the key input control procedure 1.
Figure 2.1.9 shows a timing diagram 1 where
switch A is pressed.
CMOS I/O
port A
CMOS I/O
port B
CMOS I/O
port C
SW A
SW B
SW C
Virtual
r = 10 kΩ
capacitor (C)
Fig. 2.1.7 Connection example 1 for key input
V1
Key input
V2
Output “H” for charging to each
port
V3
After inputting data into the port
direction register, judge ON/OFF
of key input.
V1 In the case of no key input, output “L” (Noise counter-
measure).
V2 A virtual capacitor (C) is charged by outputting “H.”
(For capacitance, refer to the next page.)
V3 Set the port direction register for input mode with an
instruction immediately after “H” is output.
(For the limit timer for ON/OFF judgment and the
discharging time at ON, refer to the next page.)
V4 For double reading to ensure data, repeat V2 and V3.
V4
Fig. 2.1.8 Key input control procedure 1
2–8
3820 GROUP USER’S MANUAL