English
Language : 

UPD784938 Datasheet, PDF (409/733 Pages) NEC – 16-Bit Single-Chip Microcontrollers
CHAPTER 16 A/D CONVERTER
Caution Once the A/D converter starts operating, conversion operations are performed repeatedly until the CS
bit of the A/D converter mode register (ADM) is cleared (to 0). Therefore, a superfluous interrupt may
be generated if ADM setting is performed after interrupt-related registers, etc., when A/D converter
mode conversion, etc., is performed. The result of this superfluous interrupt is that the conversion
result storage address appears to have been shifted when the scan mode is used. Also, when the select
mode is used, the first conversion result appears to have been an abnormal value, such as the
conversion result for the other channel. It is therefore recommended that A/D converter mode
conversion be carried out using the following procedure.
<1> Write to the ADM (CS bit must be set (to 1))
<2> Interrupt request flag (ADIF) clearance (to 0)
<3> Interrupt mask flag or interrupt service mode flag setting
Operations <1> to <3> should not be divided by an interrupt or macro service. When scan mode 0 (no
delay control) is used, in particular, you should ensure that the time between <1> and <2> is less than
the time taken by one A/D conversion operation.
Alternatively, the following procedure is recommended.
<1> Stop the A/D conversion operation by clearing (to 0) the CS bit of the ADM.
<2> Interrupt request flag (ADIF) clearance (to 0).
<3> Interrupt mask flag or interrupt service mode flag setting
<4> Write to the ADM
Preliminary User’s Manual U13987EJ1V0UM00
409