English
Language : 

M16C28 Datasheet, PDF (244/423 Pages) Renesas Technology Corp – 16-BIT SINGLE-CHIP MICROCOMPUTER M16C FAMILY / M16C/Tiny SERIES
M16C/28 Group (M16C/28, M16C/28B)
15. A/D Converter
A/D Control Register 0 (1)
b7 b6 b5 b4 b3 b2 b1 b0
00
Symbol
ADCON0
Address
03D616
After Reset
00000XXX 2
Bit Symbol
Bit Name
CH0
Analog Input Pin
Select Bit (2, 3)
CH1
CH2
MD0
MD1
TRG
ADST
CKS0
A/D Operation Mode
Select Bit 0 (3)
Trigger Select Bit
A/D Conversion Start
Flag
Frequency Select Bit 0
Function
b2 b1 b0
0 0 0 : Select AN0
0 0 1 : Select AN1
0 1 0 : Select AN2
0 1 1 : Select AN3
1 0 0 : Select AN4
1 0 1 : Select AN5
1 1 0 : Select AN6
1 1 1 : Select AN7
b4 b3
0 0 : One-shot mode or delayed trigger mode
0,1
0 : Software trigger
1 : Hardware trigger (AD TRG trigger)
0 : A/D conversion disabled
1 : A/D conversion started
See Table 15.2
RW
RW
RW
RW
RW
RW
RW
RW
RW
NOTES:
1. If the ADCON0 register is rewritten during A/D conversion, the conversion result will be indeterminate.
2. AN00 to AN07 and AN20 to AN27 can be used in the same way as AN 0 to AN7. Use the ADGSEL1 to
ADGSEL 0 bits in the ADCON2 register to select the desired pin.
3. After rewriting the MD1 to MD0 bits, set the CH2 to CH0 bits over again using an another instruction.
A/D Control Register 1 (1)
b7 b6 b5 b4 b3 b2 b1 b0
1
0
Symbol
ADCON1
Address
03D716
After Reset
0016
Bit Symbol
Bit Name
Function
RW
A/D Sweep Pin
Invalid in one-shot mode
RW
SCAN0 Select Bit
SCAN1
RW
MD2
BITS
CKS1
VCUT
(b7-b6)
A/D Operation Mode
Select Bit 1
0 : Any mode other than repeat sweep
mode 1
8/10-Bit Mode Select Bit 0 : 8-bit mode
1 : 10-bit mode
Frequency Select Bit 1 Refer to Table 15.2
Vref Connect Bit (2)
1 : Vref connected
Nothing is assigned. When write, set to “0”.
When read, its content is “0”.
RW
RW
RW
RW
NOTES:
1. If the ADCON1 register is rewritten during A/D conversion, the conversion result will be indeterminate.
2. If the VCUT bit is reset from “0” (Vref unconnected) to “1” (Vref connected), wait for 1 µs or more before starting
A/D conversion.
A/D Control Register 2 (1)
b7 b6 b5 b4 b3 b2 b1 b0
00
Symbol
ADCON2
Address
03D416
After Reset
0016
Bit Symbol
Bit Name
SMP
A/D Conversion Method
Select Bit
ADGSEL0 A/D Input Group Select
Bit
ADGSEL1
(b3)
CKS2
Reserved Bit
Frequency Select Bit 2
Function
0 : Without sample and hold
1 : With sample and hold
b2 b1
0 0 : Select port P10 group
0 1 : Do not set
1 0 : Select port P0 group
1 1 : Select port P1/P9 group
Set to “0”
See Table 15.2
TRG1
Trigger Select Bit 1
Set to "0" in one-shot mode
(b7-b6)
Nothing is assigned. When write, set to “0”.
When read, its content is “0”.
NOTES:
1. If the ADCON2 register is rewritten during A/D conversion, the conversion result will be indeterminate.
RW
RW
RW
RW
RW
RW
RW
Figure 15.7 ADCON0 to ADCON2 Registers in One-Shot Mode
Rev. 2.00 Jan. 31, 2007 page 224 of 385
REJ09B0047-0200