Introduction
This project demonstrates the usage of QTouch in Atmel UC3A, UC3B and UC3C devices.
Example Application Notes:
- To provide touch sensing capability in the project, appropriate library file should be linked with the application which is available in the ATMEL QTOUCH LIBRARY.
- The touch_api.h header file is the public header file should be included in which touch sensors and channels can be defined. The application here is configured for 32 channels with rotor slider(can be enabled by adding (ROTOR_SLIDER) that means the sensors are configured for keys with one channel, rotor with 3 channels and a slider with 3 channels.
- The timer triggers an interrupt whenever RC compare match has occurred. The RC value is loaded in a way that the compare match occurs on 25ms. So for each 25ms, the sensor detects for the touch and if it is in detect, the led is set.
- QTouch Studio is used to visualize the touch board virtually on the PC. To utilize this feature, DBEUG_INTERFACE should be enabled. It uses BitBangSPI for communicating to the PC, which is one way communication.
- When QTouch Library with channels less than 16(requires 32 GPIOs) is used, intraport bursting can be enabled by setting both SNS ans SNKS as the same port and adding SNS_SNSK_SAME_PORT symbol in the project.
Main files
References
- Refer Application Note: Atmel QTouch Library User Guide
- Refer Application Note: ASF Getting Started Guide
- Refer Application Note: ASF Reference Manual
Compiler Support
The example application supports:
- IAR EWAVR32
- GNU GCC for AVR32
Device Support
- AT32UC3A0/A1 Series
- AT32UC3B0/B1 Series
- AT32UC3C0/C1 Series
Test Information
This example has been tested with the following :
- AVR Studio 5.0
- IAR32 Embedded Workbench
- STK600 development board
- 1.8V and 3.3V Supply mode
- Tested with devices –AT32UC3A0512 –AT32UC3B0256 –AT32UC3C0512C
Hardware Setup Information
- CPU Clock Source : OSC0
- Timer Clock Source : PBA clock/2
- CPU Speed : OSC0
- PBA Speed : OSC0
- PBB Speed : OSC0
- Timer Trigger Period : Every 25ms
Hardware Setup Information
For debug interface the following connection should be done.
- UC3A0 and UC3B0 devices:
__________________________________________
| STK600 | QT600 INTERFACE BOARD|
__________________________________________
| PORTE.E0 | TOUCHDATA.PIN 05 | (SS)
| PORTE.E1 | TOUCHDATA.PIN 06 | (MOSI)
| PORTE.E2 | TOUCHDATA.PIN 07 | (MISO)
| PORTE.E3 | TOUCHDATA.PIN 08 | (SCK)
__________________________________________
- UC3C0 devices:
__________________________________________
| STK600 | QT600 INTERFACE BOARD|
__________________________________________
| PORTJ.J0 | TOUCHDATA.PIN 05 | (SS)
| PORTJ.J1 | TOUCHDATA.PIN 06 | (MOSI)
| PORTJ.J2 | TOUCHDATA.PIN 07 | (MISO)
| PORTJ.J3 | TOUCHDATA.PIN 08 | (SCK)
__________________________________________
- The mcu should be programmed and the QTouch interface board should be connected to the STK600 as stated above.
- The Power supply to the QTouch interface board should be given through USB.
- Note: Make sure that the VTG pins should be short circuited (On the QTouch interface board).
After all the hardware setup is done, plug in and plug out the USB pin on the touch interface board to get connected with the QTouch Studio.
Contact Information
For further information, visit : Atmel AVR32 .
Technical support & faq, visit : Support and FAQ .
- Author
- Microchip Technology Inc : http://www.microchip.com