Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
QTouch Sensor example with I2C interface for SAM4E-EK Documentation

Introduction

This example shows how to configure a QTouch device and get device status. Key and slide status will be outputted on terminal windows.

Main Files

  • qt_i2c.c: QTouch component driver with I2C interface implementation;
  • qt_i2c.h: QTouch component driver with I2C interface header file;
  • example.c: Example application.

Compilation Information

This software is written for GNU GCC and IAR Embedded Workbench for ARM. Other compilers may or may not work.

Device Information

AT42QT2160 on SAM4E-EK can be used.

Usage

  1. Build the program and download it into the evaluation board.
  2. Connect a serial cable to the DBGU/UART port on the evaluation kit.
  3. On the computer, open and configure a terminal application (e.g., HyperTerminal on Microsoft Windows) with these settings:
    • 115200 bauds
    • 8 data bits
    • No parity
    • 1 stop bit
    • No flow control
  4. Start the application. The following traces shall appear on the terminal:
    -- QTouch component example (with I2C interface) --
    -- xxxxxx-xx
    -- Compiled: xxx xx xxxx xx:xx:xx --
  5. Touch the QTouch key or slide on the EK board, key status will be outputted on terminal windows.

Contact Information

For further information, visit Microchip.
Support and FAQ: https://www.microchip.com/support/