Introduction

ATMEL QTouch provides a simple to use solution to realize touch sensing solutions on a range of supported ATMEL AVR Microcontrollers. The QTouch libraries provide support for both QTouch and QMatrix acquisition methods.

Touch sensing using QMatrix or QTouch acquisition methods can be added to an application by linking the appropriate ATMEL QTouch Library for the AVR Microcontroller and using a simple set of API to define the touch channels and sensors and then calling the touch sensing API’s periodically (or based on application needs) to retrieve the channel information and determine touch sensor states.

Figure 1 shows a typical configuration of channels when using an AVR and using the ATMEL QTouch Library. The ATMEL QTouch Library has been added to a host application running on an AVR microcontroller. The sample configuration illustrates using the library that supports eight touch channels numbered 0 to 7. The sensors are configured in the following order,

  1. 1.

    Sensor 0 on channels 0 to 2 have been configured as a rotor sensor.

  2. 2.

    Sensor 1 on channels 3 to 5 have been configured as a slider sensor.  

  3. 3.

    Sensor 2 on channel 6 is configured as key sensor.

  4. 4.

    Sensor 3 on channel 7 is configured as key sensor.

The host application uses the QTouch Library API’s to configure these channels and sensors, and to initiate detection of a touch using capacitive measurements.

Figure 1. Typical interface of the ATMEL QTouch library with the host application.

The QTouch libraries use minimal resources of the microcontroller. The sampling of the sensors is controlled by the QTouch library, while the sampling period is controlled by the application (possibly using timers, sleep periods, varying the CPU clock, external events like interrupts or communications, etc).