
APPLICATION
2.1 I/O pins
3822 GROUP USER’S MANUAL
2–10
Fig. 2.1.11 Key input control procedure 2
<Example> The standard time at VO = 5.0 V, Vt1 = 3.5 V
t1 = –1 ! 10–3 ! 1n
= 357
s
(2) Key input application example
According to the key input without a pull-up
resistor described in (1), an effective applica-
tion example where there are enough ports is
shown below. This method reduces both cur-
rent dissipation and quantity of parts compared
with the example shown in (1).
Figure 2.1.10 shows a connection example 2
for key input using port D and Figure 2.1.11
shows the key input control procedure 2. Fig-
ure 2.1.12 shows a timing diagram 2 where
switch A is pressed.
Fig. 2.1.10 Connection example 2 for key input
TThe discharging time (t2) at ON is obtained with t = Cr in the same way as the previous page, with
the result of t = 100 ns.
TJudge ON/OFF of key input within the time (t1) which is obtained as follows:
After the completion of “H” output,
Vt1 = VO ! e–t1/T
t1 = –T ! 1n V
t1
VO
VO : “H” output voltage
Vt1 : Input voltage after t1(s)
3.5
5.0
CMOS I/O
port A
CMOS I/O
port B
CMOS I/O
port C
SW A
SW B
SW C
Virtual
capacitor (C)
CMOS I/O
port D
Key input
V1
V2
V3
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 previous 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 Output “L” with the next instruction (refer to “Figure
2.1.12 (A)”)
V5 For double reading to ensure data, repeat V2 and V3.
V5
V4
Set the port direction register
for the input mode
After inputting data into the port
direction register, judge ON/OFF
of key input.
Output “H” for charging to each
port