Specifications

dsPIC33F Family Reference Manual
DS70183A-page 16-16 © 2006 Microchip Technology Inc.
16.4 ADC MODULE CONFIGURATION
The following steps should be followed for performing an A/D conversion:
1. Select 10-bit or 12-bit mode (ADxCON1<10>)
2. Select voltage reference source to match expected range on analog inputs
(ADxCON2<15:13>)
3. Select the analog conversion clock to match desired data rate with processor clock
(ADxCON3<7:0>)
4. Select port pins as analog inputs (ADxPCFGH<15:0> and ADxPCFGL<15:0>)
5. Determine how inputs will be allocated to Sample/Hold channels (ADxCHS0<15:0> and
ADxCHS123<15:0>)
6. Determine how many Sample/Hold channels will be used (ADxCON2<9:8>, ADx-
PCFGH<15:0> and ADxPCFGL<15:0>)
7. Determine how sampling will occur (ADxCON1<3>, ADxCSSH<15:0> and ADxC-
SSL<15:0>)
8. Select Manual or Auto Sampling
9. Select conversion trigger and sampling time.
10. Select how conversion results are stored in the buffer (ADxCON1<9:8>)
11. Select interrupt rate or DMA buffer pointer increment rate (ADxCON2<9:5>)
12. Select the number of samples in DMA buffer for each ADC module input
(ADxCON4<2:0>)
13. Select the data format
14. Configure ADC interrupt (if required)
Clear ADxIF bit
Select interrupt priority (ADxIP<2:0)
Set ADxIE bit
15. Configure DMA channel (if needed)
16. Turn on ADC module (ADxCON1<15>)
The options for these configuration steps are described in the subsequent sections.
16.5 SELECTING THE VOLTAGE REFERENCE SOURCE
The voltage references for A/D conversions are selected using the VCFG<2:0> control bits
(ADxCON2<15:13>). The upper voltage reference (V
REFH) and the lower voltage reference
(V
REFL) can be the internal AVDD and AVSS voltage rails or the VREF+ and VREF- input pins.
The external voltage reference pins can be shared with the AN0 and AN1 inputs on low pin count
devices. The ADC module can still perform conversions on these pins when they are shared with
the Vref+ and Vref- input pins.
The voltages applied to the external reference pins must meet certain specifications. Refer to the
“Electrical Specifications” section of the device data sheet for details