Touch Sensing Using Analog-to-Digital Converter With Computation (ADCC)

Last modified by Microchip on 2026/03/23 13:52

In the context of Microchip products, touch typically refers to capacitive touch sensing technology. This technology allows microcontrollers (MCUs) to detect touch input on surfaces (buttons, sliders, or wheels) without mechanical switches. Microchip offers a range of solutions for touch sensing, including dedicated touch controllers and MCUs with integrated touch modules.

MCUs With Integrated Touch Sensing

Many Microchip microcontrollers include built-in touch-sensing hardware, such as the Capacitive Voltage Divider (CVD) mode in the Analog-to-Digital Converter with Computation (ADCC) module or dedicated Peripheral Touch Controller (PTC) modules.

Touch Using ADCC

ADCC is an advanced Analog-to-Digital Converter (ADC) module found in some Microchip MCUs. It extends the basic ADC functionality by adding hardware computation features, which can process analog signals and perform calculations without CPU intervention.

The ADCC module in select Microchip MCUs features hardware support for CVD mode, enabling efficient and reliable capacitive touch sensing for various applications.

How Touch Sensing Works with ADCC

  • Sensor pad and capacitance
    • A Printed Circuit Board (PCB) pad acts as the touch sensor
    • When a finger approaches or touches the pad, the capacitance increases
  • CVD measurement cycle
    • The ADCC’s CVD mode is used to measure this change in capacitance:
      • The sensor pad is charged to a known voltage
      • The charge is shared with a reference capacitor (internal to the MCU)
      • The ADCC measures the resulting voltage, which varies with the pad’s capacitance
      • The process is repeated (often with two phases, pre-charge and measurement) to improve accuracy and noise immunity
  • Computation and filtering
    • The ADCC can average multiple samples, filter noise, and compare results to thresholds—all in hardware—reducing CPU load
  • Touch detection
    • The measured value is compared to a baseline (untouched value)
    • A significant drop or rise indicates a touch event

Hardware CVD is a technique for capacitive touch sensing, leveraging the microcontroller’s ADC and its internal sample-and-hold capacitor. This approach is particularly effective for large touch sensors and is supported on various Microchip devices.

Principle of Hardware CVD Touch Sensing

Hardware CVD uses the ADC’s internal sample-and-hold capacitor to generate a waveform for touch detection. By executing a sequence of charge and discharge operations, the system can detect changes in capacitance caused by a touch event.

Each measurement consists of two scans (scan A and scan B), each with two phases, resulting in four phases per cycle. The difference between the ADC results of scan A and scan B is used to determine the presence of a touch.

Hardware CVD Waveform

Hardware CVD Waveform

Phase 1 (pre-charge):

  • Charge the sample-and-hold capacitor to VDD
  • Discharge the sensor to ground
  • Establishes a reference value for comparison

Phase 2 (charge share and ADC conversion):

  • Connect the sample-and-hold capacitor and sensor
  • Charge is shared; voltage settles based on capacitance
  • ADC conversion is performed and the result is used as a reference

Phase 3 (reverse pre-charge):

  • Charge the sensor (potentially with added capacitance from a touch)
  • Discharge the sample-and-hold capacitor

Phase 4 (charge share and ADC conversion):

  • Connect both capacitors again
  • If touched, the sensor capacitance increases, altering the shared voltage
  • ADC conversion is performed and the result is compared to scan A

Back to Top

Sensor and Sample‑and‑Hold Capacitance Interaction

This section describes the effect of sensor capacitance relative to the internal sample‑and‑hold capacitance on the resulting waveform, phase balance, and scan signal behavior in a charge‑sharing capacitive sensing system.

Case 1: Ideal Condition — Sensor Capacitance Equals Sample‑and‑Hold Capacitance

When the sensor capacitance is approximately equal to the sample‑and‑hold capacitance, the charge‑sharing process is balanced. The waveform settles symmetrically during the acquisition phases. Phase 2 and 4 exhibit equal and opposite behavior. The resulting voltage settles near the ideal midpoint, approximately VDD/2.

Under this condition, scan A and scan B are well matched, indicating proper capacitive balance.

Sensor Capacitance Equals Sample‑and‑Hold Capacitance

Case 2: Sensor Capacitance Greater Than Sample‑and‑Hold Capacitance

When the sensor capacitance exceeds the sample‑and‑hold capacitance, charge redistribution becomes asymmetric. During phase 2, the sample‑and‑hold capacitor transfers charge to the larger sensor capacitance. Due to the higher capacitance of the sensor, a greater portion of charge is absorbed.

Consequently, the settling voltage shifts below VDD/2. During phase 4, the inverse behavior is observed.

This imbalance results in a measurable voltage difference between scan A and scan B.

Case 2: Sensor Capacitance Greater Than Sample‑and‑Hold Capacitance 

Case 3: Sensor Capacitance Less Than Sample‑and‑Hold Capacitance

When the sensor capacitance is smaller than the sample‑and‑hold capacitance, the internal capacitor dominates the charge‑sharing process.

During Phase 2, the sample‑and‑hold capacitor is pre-charged and then connected to the sensor. Because the sensor capacitance is relatively small, it can absorb only a limited amount of charge. As a result, the final settling voltage remains closer to the sample‑and‑hold pre-charge level rather than converging to VDD/2.

The settling voltage is therefore shifted above the midpoint. This asymmetry produces a consistent voltage offset between scan A and scan B.

Case 3: Sensor Capacitance Less Than Sample‑and‑Hold Capacitance

Back to Top

Touch Detection Logic

  • If no touch: ADC results from scan A and scan B are nearly equal
  • If touch: Sensor capacitance increases, causing a measurable difference (delta) between scan A and scan B ADC results
  • The delta is compared to a threshold to confirm touch

Note: The internal capacitance value supported by the device for the CVD technique can be referenced in the device datasheet.

Back to Top

Waveform Timing

Time for one scan = pre-charge time + acquisition time + conversion time

Time for one CVD waveform = 2 * time for one scan

Note: The frequency hop delay (if used) will be added to the pre-charge time.

  • Timing parameters:
    • Pre-charge time: Ensures capacitors are fully charged/discharged
    • Acquisition time: Allows for charge sharing and ADC sampling

Both parameters must be adjusted according to the system clock.

  • Oversampling:
    • Increases signal stability
    • The number of scans per waveform is determined by the oversampling setting

Back to Top

Conclusion

Hardware CVD is a robust and flexible method for self-capacitive touch sensing. Success depends on careful balancing of capacitances, precise timing adjustments, and appropriate signal processing. For the best results, always refer to device-specific documentation and leverage available auto-tuning features

Back to Top