English
Language : 

PIC16F1934_11 Datasheet, PDF (320/472 Pages) Microchip Technology – 28/40/44-Pin Flash-Based, 8-Bit CMOS Microcontrollers
PIC16(L)F1934/6/7
26.1 Analog MUX
The CPS module can monitor up to 16 inputs. The
capacitive sensing inputs are defined as CPS<15:0>.
To determine if a frequency change has occurred the
user must:
• Select the appropriate CPS pin by setting the
CPSCH<3:0> bits of the CPSCON1 register.
• Set the corresponding ANSEL bit.
• Set the corresponding TRIS bit.
• Run the software algorithm.
Selection of the CPSx pin while the module is enabled
will cause the capacitive sensing oscillator to be on the
CPSx pin. Failure to set the corresponding ANSEL and
TRIS bits can cause the capacitive sensing oscillator to
stop, leading to false frequency readings.
26.2 Capacitive Sensing Oscillator
The capacitive sensing oscillator consists of a constant
current source and a constant current sink, to produce
a triangle waveform. The CPSOUT bit of the
CPSCON0 register shows the status of the capacitive
sensing oscillator, whether it is a sinking or sourcing
current. The oscillator is designed to drive a capacitive
load (single PCB pad) and at the same time, be a clock
source to either Timer0 or Timer1. The oscillator has
three different current settings as defined by
CPSRNG<1:0> of the CPSCON0 register. The different
current settings for the oscillator serve two purposes:
• Maximize the number of counts in a timer for a
fixed time base.
• Maximize the count differential in the timer during
a change in frequency.
26.3 Voltage References
The capacitive sensing oscillator uses voltage refer-
ences to provide two voltage thresholds for oscillation.
The upper voltage threshold is referred to as Ref+ and
the lower voltage threshold is referred to as Ref-.
The VSS voltage determines the lower threshold level
(Ref-) and the VDD voltage determines the upper
threshold level (Ref+).
26.4 Power Ranges
The capacitive sensing oscillator can operate in one of
three different power modes.
There are three distinct power ranges; low, medium and
high. Current consumption is dependent upon the range
selected. See Table 26-1 for proper power range
selection.
The remaining mode is a Noise Detection mode that
resides within the high range. The Noise Detection
mode is unique in that it disables the sinking and sourc-
ing of current on the analog pin but leaves the rest of
the oscillator circuitry active. This reduces the oscilla-
tion frequency on the analog pin to zero and also
greatly reduces the current consumed by the oscillator
module.
When noise is introduced onto the pin, the oscillator is
driven at the frequency determined by the noise. This
produces a detectable signal at the comparator output,
indicating the presence of activity on the pin.
Figure 26-2 shows a more detailed drawing of the
current sources and comparators associated with the
oscillator.
TABLE 26-1: POWER RANGE SELECTION
CPSRNG<1:0>
Mode
Nominal Current(1)
00
Off
0.0 A
01
Low
0.1 A
10
Medium
1.2 A
11
High
18 A
Note 1: See the applicable Electrical Specifica-
tions Chapter for more information.
DS41364E-page 320
 2008-2011 Microchip Technology Inc.