English
Language : 

3822_03 Datasheet, PDF (76/328 Pages) Renesas Technology Corp – 8-BIT SINGLE-CHIP MICROCOMPUTER
APPLICATION
2.1 I/O pins
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 Vt1
VO
VO : “H” output voltage
Vt1 : Input voltage after t1(s)
<Example> The standard time at VO = 5.0 V, Vt1 = 3.5 V
t1 = –1 ! 10–3 ! 1n 3.5 = 357 µs
5.0
(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.
CMOS I/O
port A
CMOS I/O
port B
CMOS I/O
port C
CMOS I/O
port D
SW A
SW B
SW C
Virtual
capacitor (C)
Fig. 2.1.10 Connection example 2 for key input
V1
Key input
V2
Output “H” for charging to each
port
V3
Set the port direction register
for the input mode
V4
After inputting data into the port
direction register, judge ON/OFF
of key input.
V5
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.
Fig. 2.1.11 Key input control procedure 2
2–10
3822 GROUP USER’S MANUAL