Atmel AVR262
3
8375A-AVR-03/11
3 Application overview
This demo application acquires the QTouch key sensed, generates the report, and
sends it to a PC (host) on request. The application is built over the generic USB HID
application, which allows a simple data exchange between the PC (host) and the
device. The PC requests new, available QTouch data from the device on a regular
polling interval. The device will send data if available. Otherwise, a NAK (no
acknowledge) is sent to inform the PC that no data is available. The data package
sent from the device to the PC is referred to as Report IN.
gives the generic overview of the application.
Figure 3-1.
Application overview.
The reports sent to the host contain a set of bytes that can be used by the user
application. Because this application is using just eight QTouch keys, one byte is
sufficient to transfer the touch status, though this can be modified depending on the
requirement.
In this application, port A and port C are used for touch sensing. When the SNS and
SNSK pins are connected to the same port, the even pin numbers will be used as
SNS pins and the odd pin numbers will be used as SNSK pins.
•
PA0, PA2, PA4, PA6
Æ
SNS0, SNS1, SNS2, SNS3
•
PA1, PA3, PA5, PA7
Æ
SNSK0, SNSK1, SNSK2, SNSK3
The least-significant bit (LSB) of the report byte has the value of the sensor
connected to PA0 and PA1. Similarly the next higher bit of the report byte has the
value of the sensor connected to PA2 and PA3. The positions of the sensors in the
report byte are shown in
.