Rev.2.00
Nov 23, 2005
page 43 of 75
REJ03B0098-0200
38C5 Group (One Time PROM version)
ADKEY function
The ADKEY function is used to judge the analog input voltage input
from the ADKEY pin. When the A/D converter starts operating after
VIL (0.7 Vcc-0.5) or less is input, the event of analog voltage input
can be judged with the A/D conversion interrupt.
This function can be used with the STP and WIT state.
As for the ADKEY function in 38C5 group, the A/D conversion of
analog input voltage immediately after starting ADKEY function is
not performed.
Therefore, the A/D conversion result immediately after an ADKEY
function is undefined. Accordingly, when the A/D conversion result of
the analog input voltage input from the ADKEY pin is required, start
the A/D conversion by program after the analog input pin correspond-
ing to ADKEY is selected.
ADKEY Selection
When the ADKEY pin is used, set the ADKEY selection bit to “1”. The
ADKEY selection bit is “0”, just after the A/D conversion is started.
ADKEY Enable
The ADKEY function is enabled by writing “1” to the ADKEY enable
bit. Surely, in order to enable ADKEY function, set “1” to the ADKEY
enable bit, after setting the ADKEY selection bit to “1”.
When the ADKEY enable bit of the AD control register is “1”, the
analog input pin selection bits become invalid. Please do not write
“0” in the AD conversion completion bit by the program during ADKEY
enabled state.
[ADKEY Control Circuit]
In order to obtain a more exact conversion result, by the A/D conver-
sion with ADKEY, execute the following;
set the input to the ADKEY pin into a steep falling waveform,
stabilize the input voltage within 8 clock cycles (1
s at f(XIN) = 8
MHz) after the input voltage is under VIL, and
maintain the input voltage until the completion of the A/D conver-
sion.
The threshold voltage with an actual ADKEY pin is the voltage be-
tween VIH-VIL.
In order not to make ADKEY operation perform superfluously in a
noise etc., in the state of the waiting for an input, set the voltage of an
ADKEY pin to VIH (0.9VCC) or more.
When the following operations are performed, the A/D conversion
operation cannot be guaranteed.
When the CPU mode register is operated during A/D conversion
operation,
When the AD conversion control register is operated during A/D
conversion operation,
When the STP or WIT instruction is executed during A/D conver-
sion operation.