A/D Converter Operation Mode - NEC 78K0/KD1 Series User Manual

8-bit single-chip microcontrollers
Table of Contents

Advertisement

12.4.3 A/D converter operation mode

The operation mode of the A/D converter is the select mode. One channel of analog input is selected from ANI0 to
ANI7 by the analog input channel specification register (ADS) and A/D conversion is executed.
In addition, the following two functions can be selected by setting of bit 7 (PFEN) of the power-fail comparison
mode register (PFM).
• Normal 10-bit A/D converter (PFEN = 0)
• Power-fail detection function (PFEN = 1)
(1) A/D conversion operation (when PFEN = 0)
By setting bit 7 (ADCS) of the A/D converter mode register (ADM) to 1 and bit 7 (PFEN) of the power-fail
comparison mode register (PFM) to 0, the A/D conversion operation of the voltage, which is applied to the analog
input pin specified by the analog input channel specification register (ADS), is started.
When A/D conversion has been completed, the result of the A/D conversion is stored in the A/D conversion result
register (ADCR), and an interrupt request signal (INTAD) is generated. Once the A/D conversion has started and
when one A/D conversion has been completed, the next A/D conversion operation is immediately started. The
A/D conversion operations are repeated until new data is written to ADS.
If ADS is rewritten during A/D conversion, the A/D conversion under execution is suspended, and the A/D
conversion of the newly selected analog input channel is started.
If 0 is written to ADCS of ADM during A/D conversion, the conversion operation is immediately stopped.
Rewriting ADM
ADCS = 1
A/D conversion
ADCR
INTAD
(PFEN = 0)
Remarks 1. n = 0 to 7
2. m = 0 to 7
CHAPTER 12 A/D CONVERTER
Figure 12-11. A/D Conversion Operation
Rewriting ADS
ANIn
ANIn
Conversion is stopped
Conversion result is not retained
ANIn
Preliminary User's Manual U16315EJ1V0UD
ANIn
ANIm
ANIm
ANIn
ADCS = 0
Stopped
ANIm
235

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents