Operation In A/D Trigger Polling Mode; Operation In Select Mode - NEC UPD703116 User Manual

32-bit single-chip microcontrollers
Table of Contents

Advertisement

13.7 Operation in A/D Trigger Polling Mode

Setting the ADCE0 or ADCE1 bit of the ADSCM00 or ADSCM10 register to 1 starts A/D conversion.
Both select mode and scan mode are available in A/D trigger polling mode. Since the ADCS0 or ADCS1 bit of the
ADSCM00 or ADSCM10 register remains 1 after an INTAD0 or INTAD1 interrupt in this mode, it is not necessary to
write 1 in the ADCE0 or ADCE1 bit as an A/D conversion restart operation.

13.7.1 Operation in select mode

The analog input specified in the ADSCM00 or ADSCM10 register is A/D converted. The conversion result is
stored in the ADCR0n or ADCR1n register (n = 0 to 7).
One analog input is A/D converted at a time and the result is stored in one ADCR0n or ADCR1n register. Analog
inputs correspond one-to-one with ADCR0n or ADCR1n register.
An A/D conversion termination interrupt (INTAD0 or INTAD1) is generated for each A/D conversion termination.
A/D conversion operation is repeated until the ADCE0 or ADCE1 bit = 0 (ADCS0 or ADCS1 bit = 1).
Analog Input
A/D Conversion Result Register
ANIx
ADCRx
Remark
x = 00 to 07, 10 to 17
In A/D trigger polling mode, it is not necessary to write 1 in the ADCE0 or ADCE1 bit of the ADSCM00 or
ADSCM10 register as an A/D conversion restart operation
This is optimal for applications that regularly read A/D conversion values.
Note In A/D trigger polling mode, the fact that the ADCE0 or ADCE1 bit of the ADSCM00 or ADSCM10 register
is 0 means that A/D conversion operation does not stop as long as the ADCS0 or ADCS1 bit is not 0.
Therefore, if the ADCR0n or ADCR1n register is not read before the next A/D conversion, it is overwritten.
Figure 13-8. Example of Select Mode (A/D Trigger Polling Select) Operation (ANI02): For A/D Converter 0
ADSCM00
(1) ADCE0 bit of ADSCM00 = 1 (Enabled)
(2) A/D conversion of ANI02
(3) Store conversion result in ADCR02
662
CHAPTER 13 A/D CONVERTER
Note
.
ANI00
ANI01
ANI02
ANI03
A/D converter 0
ANI04
ANI05
ANI06
ANI07
(4) Generate INTAD0 interrupt
(5) Return to (2)
User's Manual U14492EJ5V0UD
ADCR00
ADCR01
ADCR02
ADCR03
ADCR04
ADCR05
ADCR06
ADCR07

Advertisement

Table of Contents
loading

Table of Contents