2.3 Touch Sensing
The microcontroller can perform capacitive touch sensing. For PIC MCUs, the Capacitive Voltage Divider (CVD) feature inside some ADCs allows for touch detection. For AVR MCUs, use a dedicated Peripheral Touch Controller (PTC) that interfaces with the ADC.
In both cases, the measurement starts by charging a capacitor to a known voltage, then connecting to a discharged capacitor. Assuming all charge from the original capacitor is conserved, the voltage across both capacitors is related to the total amount of capacitance in the system.
The system capacitance changes when a capacitive button is approached or touched and affects the voltage across both capacitors and detects a touch.
For more information on using this feature, consult the device data sheet and related technical documents.