English
Language : 

PIC16LF18854 Datasheet, PDF (350/668 Pages) Microchip Technology – C Compiler Optimized RISC Architecture
PIC16(L)F18856/76
23.4.2 PRECHARGE CONTROL
The precharge stage is an optional period of time that
brings the external channel and internal sample and
hold capacitor to known voltage levels. Precharge is
enabled by writing a non-zero value to the ADPRE reg-
ister. This stage is initiated when an ADC conversion
begins, either from setting the ADGO bit, a special
event trigger, or a conversion restart from the computa-
tion functionality. If the ADPRE register is cleared when
an ADC conversion begins, this stage is skipped.
During the precharge time, CHOLD is disconnected from
the outer portion of the sample path that leads to the
external capacitive sensor and is connected to either
VDD or VSS, depending on the value of the ADPPOL bit
of ADCON1. At the same time, the port pin logic of the
selected analog channel is overridden to drive a digital
high or low out, in order to precharge the outer portion
of the ADC’s sample path, which includes the external
sensor. The output polarity of this override is also deter-
mined by the ADPPOL bit of ADCON1. The amount of
time that this charging needs is controlled by the
ADPRE register.
Note:
The external charging overrides the TRIS
setting of the respective I/O pin. If there is
a device attached to this pin, precharge
should not be used.
23.4.3 ACQUISITION CONTROL
The Acquisition stage is an optional time for the voltage
on the internal sample and hold capacitor to charge or
discharge from the selected analog channel.This
acquisition time is controlled by the ADACQ register.
When ADPRE=0, acquisition starts at the beginning of
conversion. When ADPRE=1, the acquisition stage
begins when precharge ends.
At the start of the acquisition stage, the port pin logic of
the selected analog channel is overridden to turn off the
digital high/low output drivers so they do not affect the
final result of the charge averaging. Also, the selected
ADC channel is connected to CHOLD. This allows
charge averaging to proceed between the precharged
channel and the CHOLD capacitor.
Note:
When ADPRE!=0, acquisition time cannot
be ‘0’. In this case, setting ADACQ to ‘0’
will set a maximum acquisition time (256
ADC clock cycles). When precharge is
disabled, setting ADACQ to ‘0’ will disable
hardware acquisition time control.
23.4.4 GUARD RING OUTPUTS
The purpose of the guard ring is to generate a signal in
phase with the CVD sensing signal to minimize the
effects of the parasitic capacitance on sensing elec-
trodes. It also can be used as a mutual drive for mutual
capacitive sensing. For more information about active
guard and mutual drive, see Application Note AN1478,
“mTouchTM Sensing Solution Acquisition Methods
Capacitive Voltage Divider” (DS01478).
Figure 23-8 shows a typical guard ring circuit. CGUARD
represents the capacitance of the guard ring trace
placed on the PCB board. The user selects values for
RA and RB that will create a voltage profile on CGUARD,
which will match the selected acquisition channel.
The ADC has two guard ring drive outputs, ADGRDA
and ADGRDB. These outputs can be routed through
PPS controls to I/O pins (see Section 13.0 “Periph-
eral Pin Select (PPS) Module” for details). The polar-
ity of these outputs are controlled by the ADGPOL and
ADIPEN bits of ADCON1.
At the start of the first precharge stage, both outputs
are set to match the ADGPOL bit of ADCON1. Once
the acquisition stage begins, ADGRDA changes
polarity, while ADGRDB remains unchanged. When
performing a double sample conversion, setting the
ADIPEN bit of ADCON1 causes both guard ring
outputs to transition to the opposite polarity of
ADGPOL at the start of the second precharge stage,
and ADGRDA toggles again for the second acquisition.
For more information on the timing of the guard ring
output, refer to Figure 23-8 and Figure 23-9.
FIGURE 23-8:
GUARD RING CIRCUIT
ADGRDA
RA
ADGRDB
RB
CGUARD
DS40001824A-page 350
Preliminary
 2016 Microchip Technology Inc.