English
Language : 

PIC16F707 Datasheet, PDF (120/284 Pages) Microchip Technology – 40/44-Pin, Flash Microcontrollers with nanoWatt XLP and mTouch™ Technology
PIC16F707/PIC16LF707
16.1 Analog MUX
Each capacitive sensing module can monitor up to 16
inputs, providing 32 capacitive sensing inputs in total.
The capacitive sensing inputs are defined as
CPSA<15:0> for capacitive sensing module A, and
CPSB<15:0> for capacitive sensing module B. To
determine if a frequency change has occurred the use
must:
• Select the appropriate CPS pin by setting the
CPSxCH<3:0> bits of the CPSxCON1 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.
16.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 CPSxOUT bit of the
CPSxCON0 register shows the status of the capacitive
sensing oscillator, whether it is 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 TimerA/B or Timer1/3. The oscillator
has three different current settings as defined by
CPSxRNG<1:0> of the CPSxCON0 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.
16.3 Voltage References
The capacitive sensing oscillator uses voltage
references 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 user can elect to use fixed voltage references,
which are internal to the capacitive sensing oscillator,
or variable voltage references, which are supplied by
the Fixed Voltage Reference (FVR) module and the
Digital-to-Analog Converter (DAC) module.
When the fixed voltage references are used, the VSS
voltage determines the lower threshold level (Ref-) and
the VDD voltage determines the upper threshold level
(Ref+).
When the variable voltage references are used, the
DAC voltage determines the lower threshold level
(Ref-) and the FVR voltage determines the upper
threshold level (Ref+). An advantage of using these ref-
erence sources is that oscillation frequency remains
constant with changes in VDD.
Different oscillation frequencies can be obtained
through the use of these variable voltage references.
The more the upper voltage reference level is lowered
and the more the lower voltage reference level is
raised, the higher the capacitive sensing oscillator
frequency becomes.
Selection between the voltage references is controlled
by the CPSxRM bit of the CPSxCON0 register. Setting
this bit selects the variable voltage references and
clearing this bit selects the fixed voltage references.
Please see Section 10.0 “Fixed Voltage Reference”
and Section 11.0 “Digital-to-Analog Converter
(DAC) Module” for more information on configuring
the variable voltage levels.
DS41418A-page 120
Preliminary
 2010 Microchip Technology Inc.