APPENDIX D LIST OF CAUTIONS
User’s Manual U18172EJ2V0UD
316
(9/15)
Chapter
Cl
assi
fi
cati
on
Function Details
of
Function
Cautions Page
The analog input pins (ANI0 to ANI3) are also used as input port pins (P20 to
P23).
When A/D conversion is performed with any of ANI0 to ANI3 selected, do not
access P20 to P23 while conversion is in progress; otherwise the conversion
resolution may be degraded.
p. 165
ANI0/P20 to
ANI3/P23
If a digital pulse is applied to the pins adjacent to the pins currently used for A/D
conversion, the expected value of the A/D conversion may not be obtained due to
coupling noise. Therefore, do not apply a pulse to the pins adjacent to the pin
undergoing A/D conversion.
p. 165
Input
impedance of
ANI0 to ANI3
pins
In this A/D converter, the internal sampling capacitor is charged and sampling is
performed during sampling time.
Since only the leakage current flows other than during sampling and the current
for charging the capacitor also flows during sampling, the input impedance
fluctuates both during sampling and otherwise.
If the shortest conversion time of the reference voltage is used, to perform
sufficient sampling, it is recommended to make the output impedance of the
analog input source 1 k
Ω
or lower, or attach a capacitor of around 0.01
µ
F to 0.1
µ
F to the ANI0 to ANI3 pins (see Figure 9-19).
When writing the flash memory on-board, supply a stabilized analog voltage to the
ANI2 and ANI3 pins, without attaching a capacitor. Because the communication
pulse may change and the communication may fail if a capacitor is attached to
remove noise.
p. 165
Interrupt
request flag
(ADIF)
The interrupt request flag (ADIF) is not cleared even if the analog input channel
specification register (ADS) is changed.
Therefore, if an analog input pin is changed during A/D conversion, the A/D
conversion result and ADIF for the pre-change analog input may be set just
before the ADS rewrite. Caution is therefore required since, at this time, when
ADIF is read immediately after the ADS rewrite, ADIF is set despite the fact A/D
conversion for the post-change analog input has not ended.
When A/D conversion is stopped and then resumed, clear ADIF before the A/D
conversion operation is resumed.
p. 165
Conversion
results just after
A/D conversion
start
The first A/D conversion value immediately after A/D conversion starts may not
fall within the rating range if the ADCS bit is set to 1 within 1
µ
s after the ADCE bit
was set to 1, or if the ADCS bit is set to 1 with the ADCE bit = 0. Take measures
such as polling the A/D conversion end interrupt request (INTAD) and removing
the first conversion result.
p. 166
Chapter 9
Soft
A/D
converter
A/D conversion
result register
(ADCR,
ADCRH) read
operation
When a write operation is performed to the A/D converter mode register (ADM)
and analog input channel specification register (ADS), the contents of ADCR and
ADCRH may become undefined. Read the conversion result following conversion
completion before writing to ADM and ADS. Using a timing other than the above
may cause an incorrect conversion result to be read.
p. 166
IF0: Interrupt
request flag
registers,
MK0: Interrupt
mask flag
registers
Because P21 and P32 have an alternate function as external interrupt inputs,
when the output level is changed by specifying the output mode of the port
function, an interrupt request flag is set. Therefore, the interrupt mask flag should
be set to 1 before using the output mode.
pp. 170,
171
Be sure to clear bits 0, 1, 6, and 7 to 0.
p. 171
Chapter 10
Soft
Interrupt
functions
INTM0: External
interrupt mode
register 0
Before setting the INTM0 register, be sure to set the corresponding interrupt mask
flag (
××
MK
×
= 1) to disable interrupts. After setting the INTM0 register, clear the
interrupt request flag (
××
IF
×
= 0), then clear the interrupt mask flag (
××
MK
×
= 0),
which will enable interrupts.
p. 172