English
Language : 

PIC16LF18854 Datasheet, PDF (339/668 Pages) Microchip Technology – C Compiler Optimized RISC Architecture
PIC16(L)F18856/76
23.1 ADC Configuration
When configuring and using the ADC the following
functions must be considered:
• Port configuration
• Channel selection
• ADC voltage reference selection
• ADC conversion clock source
• Interrupt control
• Result formatting
• Conversion Trigger Selection
• ADC Acquisition Time
• ADC Precharge Time
• Additional Sample and Hold Capacitor
• Single/Double Sample Conversion
• Guard Ring Outputs
23.1.1 PORT CONFIGURATION
The ADC can be used to convert both analog and
digital signals. When converting analog signals, the I/O
pin should be configured for analog by setting the
associated TRIS and ANSEL bits. Refer to
Section 12.0 “I/O Ports” for more information.
Note:
Analog voltages on any pin that is defined
as a digital input may cause the input
buffer to conduct excess current.
23.1.2 CHANNEL SELECTION
There are several channel selections available:
• Eight PORTA pins (RA<7:0>)
• Eight PORTB pins (RB<7:0>)
• Eight PORTC pins (RC<7:0>)
• Eight PORTD pins (RD<7:0>, PIC16(L)F18875
only)
• Three PORTE pins (RE<2:0>, PIC16(L)F18875
only)
• Temperature Indicator
• DAC output
• Fixed Voltage Reference (FVR)
• AVSS (ground)
The ADPCH register determines which channel is
connected to the sample and hold circuit.
When changing channels, a delay is required before
starting the next conversion. Refer to Section 23.2
“ADC Operation” for more information.
23.1.3 ADC VOLTAGE REFERENCE
The ADPREF bits of the ADREF register provides
control of the positive voltage reference. The positive
voltage reference can be:
• VREF+ pin
• VDD
• FVR 1.024V
• FVR 2.048V
• FVR 4.096V
The ADNREF bit of the ADREF register provides
control of the negative voltage reference. The negative
voltage reference can be:
• VREF- pin
• VSS
See Section 16.0 “Fixed Voltage Reference (FVR)”
for more details on the Fixed Voltage Reference.
23.1.4 CONVERSION CLOCK
The source of the conversion clock is software
selectable via the ADCLK register and the ADCS bit of
the ADCON0 register. There are 66 possible clock
options:
• FOSC
• FOSC/(2*n) (where n is from 1 to 64),
• FRC (dedicated RC oscillator)
•
•
•
The time to complete one bit conversion is defined as
TAD. One full 10-bit conversion requires 11.5 TAD peri-
ods as shown in Figure 23-2.
For correct conversion, the appropriate TAD specification
must be met. Refer to Table 37-13 for more information.
Table 23-1 gives examples of appropriate ADC clock
selections.
Note 1: Unless using the FRC, any changes in
the system clock frequency will change
the ADC clock frequency, which may
adversely affect the ADC result.
2: The internal control logic of the ADC runs
off of the clock selected by the ADCS bit
of ADCON0. What this can mean is when
the ADCS bit of ADCON0 is set to 1 (ADC
runs on FRC), there may be unexpected
delays in operation when setting ADC
control bits.
 2016 Microchip Technology Inc.
Preliminary
DS40001824A-page 339