AT42QTAN0040 ATMEL [ATMEL Corporation], AT42QTAN0040 Datasheet - Page 2

no-image

AT42QTAN0040

Manufacturer Part Number
AT42QTAN0040
Description
Driving the AT42QT2160 QMatrix Sensor IC
Manufacturer
ATMEL [ATMEL Corporation]
Datasheet
2.2
2.3
3. The Example QT2160 Project
3.1
3.2
2
QT2160 Host Interface
QT2160 Programming Model
Introduction
Circuit Configuration
Driving the AT42QT2160
The QT2160 connects to a host controller by means of an I
uses a common two-wire connection between the host QT2160 and other I
devices in the system. The bus protocol takes care of all addressing functions and bidirectional
data transfer. Full details can be found in the Philips document “The I
In addition, the QT2160 features a CHANGE pin, which can be used either to wake the host in a
battery-powered application or as an interrupt signal to inform the host when the QT2160 status
has changed. The CHANGE pin can be left unconnected in systems where the QT2160 is polled
via the I
All communication with the QT2160 takes place via a set of addressable, 8-bit registers. All read
and write operations to the registers are made via the I
performing reads and writes is based on that used for standard serial EEPROM devices and is
fully described in the QT2160 datasheet. The example code presented in this application note
includes a suitable I
The example project shows how to use the host interface to read real-time touch information
from the QT2160. It also shows how the discrete output pins of the QT2160 can be
simultaneously driven to reflect the touch status.
Figure 1-1 on page 1
connected to the X/Y drive signals as described in the datasheet. The example uses a five-key
slider comprising keys 0 – 4, and eight discrete keys connected as keys 8 – 15. Connection to
the host microcontroller uses the two I
The example uses LEDs on QT2160 pins GPO0 to GPO3 to indicate touches on keys 8 – 11. It
also uses an LED on GPIO3 to indicate the slider position by means of the PWM function.
The following points should be noted:
The example code assumes the following port assignments on the host microcontroller:
• The QT2160 I
• Pull-up resistors are required on the I
• The CHANGE pin has open-drain characteristics and requires a pull-up resistor.
• LEDs are connected to the appropriate pins of the QT2160 using inverting buffers as
• SDA is connected to P0.6.
• SCL is connected to P0.7.
• CHANGE is connected to P0.3.
demonstration program uses address 0x0d, which is selected by connecting I2CA1 = I2CA0
= Vss.
pull-up resistors or the host microcontroller’s weak pull-ups can be used. Ensure that the
pull-up resistors are connected to the same Vdd level as the QT2160.
described in the datasheet.
2
C-compatible bus on a regular basis.
2
C-compatible slave address can be selected via pins I2CA1 and I2CA0. The
2
C-compatible driver.
shows the circuit used for this example. Representative touch keys are
2
C-compatible pins (SCL and SDA) and the CHANGE pin.
2
C-compatible signals (SCL and SDA). Either discrete
2
C-compatible bus. The protocol for
2
C-compatible serial interface. This
2
C-Bus Specification”.
2
10702A–AT42–07/08
C-compatible

Related parts for AT42QTAN0040