R01UH0136EJ0210 Rev.2.10
Page 625 of 800
Jul 31, 2012
M16C/64A Group
27. A/D Converter
27.2.6
A/D Control Register 1 (ADCON1)
If the ADCON1 register is rewritten during A/D conversion, the conversion result is undefined.
SCAN1-SCAN0 (A/D sweep pin select bit) (b1-b0)
These bits are disabled in one-shot and repeat modes. In single sweep mode, repeat sweep mode 0,
and repeat sweep mode 1, pins AN0_0 to AN0_7 and AN2_0 to AN2_7 can be used in the same way
as pins AN0 to AN7. Use bits ADGSEL1 to ADGSEL0 in the ADCON2 register to select the desired
group.
MD2 (A/D operation mode select bit 1) (b2)
A/D operation mode is selected by a combination of bits MD1 to MD0 in the ADCON0 register and the
MD2 bit. See Table 27.5 “A/D Operation Mode”.
ADSTBY (A/D standby bit) (b5)
If the ADSTBY bit is changed from 0 (A/D operation stopped) to 1 (A/D operation enabled), wait for one
φ
AD cycle or more before starting A/D conversion.
When the A/D converter is not used, no current flows in the A/D converter by setting the ADSTBY bit to
0 (A/D operation stopped: standby). This helps reduce power consumption.
b7 b6 b5 b4
b1
b2
b3
Symbol
ADCON1
Address
03D7h
After Reset
0000 X000b
b0
Function
Bit Symbol
Bit Name
RW
A/D Control Register 1
In single sweep mode or repeat sweep
mode 0
b1 b0
0 0: AN0 to AN1 (2 pins)
0 1: AN0 to AN3 (4 pins)
1 0: AN0 to AN5 (6 pins)
1 1: AN0 to AN7 (8 pins)
In repeat sweep mode 1
b1 b0
0 0: AN0 (1 pin)
0 1: AN0 to AN1 (2 pins)
1 0: AN0 to AN2 (3 pins)
1 1: AN0 to AN3 (4 pins)
A/D sweep pin select bit
SCAN0
RW
SCAN1
RW
MD2
0 : Any mode other than repeat sweep mode 1
1 : Repeat sweep mode 1
A/D operation mode select
bit 1
RW
CKS1
Refer to the CKS0 bit in the ADCON0
register.
Frequency select bit 1
RW
ADSTBY
0 : A/D operation stopped (standby)
1 : A/D operation enabled
A/D standby bit
RW
—
(b3)
No register bit. If necessary, set to 0. Read as undefined value
—
In one-shot mode or repeat mode
b7 b6
0 0: ANEX0 to ANEX1 are not used
0 1: ANEX0 input is A/D converted
1 0: ANEX1 input is A/D converted
1 1: Do not set this value
Extended pin select bit
ADEX0
RW
ADEX1
RW
Содержание M16C/60 Series
Страница 853: ...M16C 64A Group R01UH0136EJ0210...