Datasheet

78K0/Kx2-L CHAPTER 12 A/D CONVERTER
R01UH0028EJ0400 Rev.4.00 426
Sep 27, 2010
12.4.3 A/D converter operation mode
One channel of analog input is selected from ANI0 to ANI10 and PGA output by the analog input channel specification
register (ADS) and A/D conversion is executed.
Remark A/D converter analog input pins differ depending on products.
78K0/KY2-L: ANI0 to ANI3
78K0/KA2-L (20-pin products): ANI0 to ANI5
78K0/KA2-L (25-pin products): ANI0 to ANI6
78K0/KA2-L (32-pin products): ANI0 to ANI10
78K0/KB2-L: ANI0 to ANI3, ANI8 to ANI10
78K0/KC2-L (40-pin product): ANI0 to ANI6, ANI8 to ANI10
78K0/KC2-L (44-pin and 48-pin products): ANI0 to ANI10
(1) A/D conversion operation
By setting bit 7 (ADCS) of the A/D converter mode register 0 (ADM0) to 1, 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, ADCRH, ADCRL), and an interrupt request signal (INTAD) is generated. When one A/D conversion
has been completed, the next A/D conversion operation is immediately started.
If ADS is rewritten during A/D conversion, the A/D conversion operation under execution is stopped and restarted
from the beginning.
If 0 is written to ADCS during A/D conversion, A/D conversion is immediately stopped. At this time, the conversion
result immediately before is retained.
Figure 12-15. A/D Conversion Operation
ANIn
Rewriting ADM0
ADCS = 1
Rewriting ADS ADCS = 0
ANIn
ANIn ANIn ANIm
ANIn ANIm ANIm
Stopped
Conversion result
immediately before
is retained
A/D conversion
ADCR,
ADCRL,
ADCRH
INTAD
Conversion is stopped
Conversion result immediately
before is retained
Remarks 1. n = 0 to 10 (it depends on products)
2. m = 0 to 10 (it depends on products)
<R>