Microchip Technology DM164130-2 Data Sheet

Page of 478
PIC16(L)F1946/47
DS41414D-page 330
 2010-2012 Microchip Technology Inc.
26.2.2
CURRENT RANGES
The capacitive sensing oscillator can operate in one of
seven different power modes. The power modes are
separated into two ranges; the low range and the high
range.
When the oscillator’s low range is selected, the fixed
internal voltage references of the capacitive sensing
oscillator are being used. When the oscillator’s high
range is selected, the variable voltage references
supplied by the FVR and DAC modules are being used.
Selection between the voltage references is controlled
by the CPSRM bit of the CPSCON0 register. See
 for more
information.
Within each range there are three distinct Power modes;
low, medium and high. Current consumption is dependent
upon the range and mode selected. Selecting Power
modes within each range is accomplished by configuring
the CPSRNG <1:0> bits in the CPSCON0 register. See
 for proper Power mode 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.
 shows a more detailed drawing of the
current sources and comparators associated with the
oscillator.
TABLE 26-1:
POWER MODE SELECTION
26.2.3
TIMER RESOURCES
To measure the change in frequency of the capacitive
sensing oscillator, a fixed time base is required. For the
period of the fixed time base, the capacitive sensing
oscillator is used to clock either Timer0 or Timer1. The
frequency of the capacitive sensing oscillator is equal
to the number of counts in the timer divided by the
period of the fixed time base.
26.2.4
FIXED TIME BASE
To measure the frequency of the capacitive sensing
oscillator, a fixed time base is required. Any timer
resource or software loop can be used to establish the
fixed time base. It is up to the end user to determine the
method in which the fixed time base is generated.
26.2.4.1
Timer0
To select Timer0 as the timer resource for the CPS
module:
• Set the T0XCS bit of the CPSCON0 register.
• Clear the TMR0CS bit of the OPTION_REG 
register.
When Timer0 is chosen as the timer resource, the
capacitive sensing oscillator will be the clock source for
Timer0. Refer to 
 for
additional information.
CPSRM
Range
CPSRNG<1:0>
Current Range
Nominal Current
(1)
1
High
00
Noise Detection
0.0 
A
01
Low
A
10
Medium
30 
A
11
High
100 
A
0
Low
00
Off
0.0 
A
01
Low
0.25 
A
10
Medium
1.5 
A
11
High
7.5 
A
Note 1:
Se
 for more information.
Note:
The fixed time base can not be generated
by the timer resource that the capacitive
sensing oscillator is clocking.