Overview of QTouch Library for ATtiny20

For an overview of QTouch method based capacitive touch acquisition, refer Section 5.2.1 QTouch Acquistion method.

The QTouch Library for ATtiny20 device allows for Sensor configuration and Sensor Acquisition parameter setting.  Based on the input Sensor configuration, the QTouch Library takes care of the capacitive touch acquisition data capture operations on the external capacitive touch sensors.  The captured Touch Data and Touch Button ON/OFF Status information is then available for user application.

The diagram below indicates a Typical Sensor arrangement using the Tiny20 device.  The QTouch Library uses the ATtiny20 ADC Module to peform capacitive Touch measurements.  The ADC module must be enabled by the Host Application and configured in Free running mode for QTouch Library to function correctly.  The PA0 pin must be configured as Output pin and should be in HIGH state before the qt_measure_sensors API is called.   Port pins PA1 to PA7 can be used to support upto 5 Touch Buttons.  The Touch Buttons must be connected to sequential Port pins.  However, it is not necessary to start the first Touch Button on Port pin PA1.  For Example, when 3 Touch Buttons are required, they can by connected to pins PA5, PA6 and PA7.

The Sensor numbering is always in the increasing order of Port pin.

Figure 1. Schematic overview of QTouch on Tiny20