2000 Microchip Technology Inc.
DS30605C-page 81
PIC16C63A/65B/73B/74B
The following steps should be followed for doing an A/D
conversion:
1.
Configure the A/D module:
• Configure analog pins, voltage reference,
and digital I/O (ADCON1)
• Select A/D input channel (ADCON0)
• Select A/D conversion clock (ADCON0)
• Turn on A/D module (ADCON0)
2.
Configure A/D interrupt (if desired):
• Clear ADIF bit (PIR1<6>)
• Set ADIE bit (PIE1<6>)
• Set PEIE bit (INTCON<6>)
• Set GIE bit (INTCON<7>)
3.
Wait the required acquisition time.
4.
Set GO/DONE bit (ADCON0) to start conversion.
5.
Wait for A/D conversion to complete, by either:
Polling for the GO/DONE bit to be cleared (if
interrupts are disabled);
OR
Waiting for the A/D interrupt.
6.
Read A/D result register (ADRES), clear bit
ADIF if required.
7.
For next conversion, go to step 1 or step 2 as
required. The A/D conversion time per bit is
defined as T
AD
. A minimum wait of 2 T
AD
is
required before next acquisition starts.
FIGURE 12-1:
A/D BLOCK DIAGRAM
(Input Voltage)
V
IN
V
REF
(Reference
Voltage)
V
DD
PCFG2:PCFG0
CHS2:CHS0
000
or
010
or
100
or
001
or
011
or
101
RE2/AN7
(1)
RE1/AN6
(1)
RE0/AN5
(1)
RA5/AN4
RA3/AN3/V
REF
RA2/AN2
RA1/AN1
RA0/AN0
111
110
101
100
011
010
001
000
A/D
Converter
Note
1:
Not available on PIC16C73B.
11x
Summary of Contents for PIC16C63A
Page 4: ...PIC16C63A 65B 73B 74B DS30605C page 4 2000 Microchip Technology Inc NOTES ...
Page 6: ...PIC16C63A 65B 73B 74B DS30605C page 6 2000 Microchip Technology Inc NOTES ...
Page 8: ...PIC16C63A 65B 73B 74B DS30605C page 8 2000 Microchip Technology Inc NOTES ...
Page 28: ...PIC16C63A 65B 73B 74B DS30605C page 28 2000 Microchip Technology Inc NOTES ...
Page 42: ...PIC16C63A 65B 73B 74B DS30605C page 42 2000 Microchip Technology Inc NOTES ...
Page 78: ...PIC16C63A 65B 73B 74B DS30605C page 78 2000 Microchip Technology Inc NOTES ...
Page 112: ...PIC16C63A 65B 73B 74B DS30605C page 112 2000 Microchip Technology Inc NOTES ...
Page 152: ...PIC16C63A 65B 73B 74B DS30605C page 152 2000 Microchip Technology Inc NOTES ...
Page 164: ...PIC16C63A 65B 73B 74B DS30605C page 164 2000 Microchip Technology Inc NOTES ...
Page 174: ...PIC16C63A 65B 73B 74B DS30605C page 174 2000 Microchip Technology Inc NOTES ...
Page 178: ...PIC16C63A 65B 73B 74B DS30605C page 178 2000 Microchip Technology Inc NOTES ...
Page 179: ... 2000 Microchip Technology Inc DS30605C page 179 PIC16C63A 65B 73B 74B NOTES ...
Page 180: ...PIC16C63A 65B 73B 74B DS30605C page 180 2000 Microchip Technology Inc NOTES ...
Page 181: ... 2000 Microchip Technology Inc DS30605C page 181 PIC16C63A 65B 73B 74B NOTES ...
Page 182: ...PIC16C63A 65B 73B 74B DS30605C page 182 2000 Microchip Technology Inc NOTES ...
Page 183: ... 2000 Microchip Technology Inc DS30605C page 183 PIC16C63A 65B 73B 74B NOTES ...