English
Language : 

C8051F970-A-GM Datasheet, PDF (132/454 Pages) Silicon Laboratories – Low Power Capacitive Sensing MCU with up to 32 kB of Flash
C8051F97x
18.4. CS0 Multiple Channel Enable
CS0 has the capability of measuring the total capacitance of multiple channels using a single conversion. When the
multiple channel feature is enabled (CS0MCEN = 1), Channels selected by AMUX0Pn are internally shorted
together and the combined node is selected as the CS0 input. This mode can be used to detect a capacitance
change on multiple channels using a single conversion and is useful for implementing “wake-on-multiple channels”.
18.5. CS0 Gain Adjustment
The gain of the CS0 circuit can be adjusted in integer increments from 1x to 8x (8x is the default). High gain gives
the best sensitivity and resolution for small capacitors, such as those typically implemented as touch-sensitive PCB
features. To measure larger capacitance values, the gain should be lowered accordingly. The bits CS0CG[2:0] in
register CS0MD set the gain value.
18.6. Wake from Suspend
CS0 has the capability of waking the device from a low power suspend mode upon detection of a “touch” using the
digital comparator. This threshold comparator event can also be used as an end-of-conversion wake by setting the
threshold registers to all zeros.
18.7. Using CS0 in Applications that Utilize Sleep Mode
To achieve maximum power efficiency, CS0 should be enabled only when taking a conversion and disabled at all
other times. CS0 must be disabled by software prior to entering sleep mode.
18.8. Automatic Scanning (Method 1—CS0SMEN = 0)
CS0 can be configured to automatically scan a sequence of contiguous CS0 input channels by configuring and
enabling auto-scan. Using auto-scan with the CS0 comparator interrupt enabled allows a system to detect a
change in measured capacitance without requiring any additional dedicated MCU resources.
Auto-scan is enabled by setting the CS0 start-of-conversion bits (CS0CF6:4) to 111b. After enabling auto-scan, the
starting and ending channels should be set to appropriate values in CS0SS and CS0SE, respectively. Writing to
CS0SS when auto-scan is enabled will cause the value written to CS0SS to be copied into CS0MX. After being
enabled, writing a 1 to CS0BUSY will start auto-scan conversions. When auto-scan completes the number of
conversions defined in the CS0 accumulator bits (CS0CF1:0), auto-scan configures CS0MX to the next sequential
port pin configured as an analog input and begins a conversion on that channel. All other pins between CS0SS and
CS0SE which are set as analog inputs are grounded during the conversion. This scan sequence continues until
CS0MX reaches the ending input channel value defined in CS0SE. After one or more conversions have been taken
at this channel, auto-scan configures CS0MX back to the starting input channel. For an example system configured
to use auto-scan, please see Figure “18.2 Auto-Scan Example” on page 133.
Note: Auto-scan attempts one conversion on a CS0MX channel regardless of whether that channel’s port pin has been
configured as an analog input. Auto-scan will also complete the current rotation when the device is halted for debugging.
If auto-scan is enabled when the device enters suspend mode, auto-scan will remain enabled and running. This
feature allows the device to wake from suspend through CS0 greater-than comparator event on any configured
capacitive sense input included in the auto-scan sequence of inputs.
132
Rev 1.0