background image

 

8375A-AVR-03/11 

 

 

 

 

 

 

   

   

 

 

 

 

 

   

   

 

 

 

 

 

   

   

 

 

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

 

 

   

   

 

 

 
 
 
 
 
 
 

 

 

   

   

 

 

Atmel Corporation 

2325 Orchard Parkway 
San Jose, CA 95131 
USA 

Tel:

  (+1)(408) 441-0311 

Fax:

 (+1)(408) 487-2600 

 

 

Atmel Asia Limited 

Unit 01-5 & 16, 19F 
BEA Tower, Milennium City 5 
418 Kwun Tong Road 
Kwun Tong, Kowloon 
HONG KONG 

Tel:

  (+852) 2245-6100 

Fax:

 (+852) 2722-1369 

 

Atmel Munich GmbH 

Business Campus 
Parkring 4 
D-85748 Garching b. Munich 
GERMANY 

Tel:

  (+49) 89-31970-0 

Fax:

 (+49) 89-3194621 

 

Atmel Japan 

9F, Tonetsu Shinkawa Bldg. 
1-24-8 Shinkawa 
Chou-ku, Tokyo 104-0033 
JAPAN 

Tel:

  (+81) 3523-3551 

Fax:

 (+81) 3523-7581 

 

 

 

 

 

   

   

 

 

©

 2011 Atmel Corporation. All rights reserved

. / Rev.: CORP072610 

 

Atmel

®

, Atmel logo and combinations thereof, AVR

®

, AVR

®

 logo, AVR Studio

®

, megaAVR

®

, AKS

®

, QTouch

®

, STK

®

, and others are 

registered trademarks or trademarks of Atmel Corporation or its subsidiaries. USB-IF Basic-Speed logo is a registered trademark of 
Universal Serial Bus Implementers Forum, Inc. Other terms and product names may be trademarks of others. 

 

Disclaimer:

 The information in this document is provided in connection with Atmel products. No license, express or implied, by estoppel or otherwise, to 

any intellectual property right is granted by this document or in connection with the sale of Atmel products. 

EXCEPT AS SET FORTH IN THE ATMEL 

TERMS AND CONDITIONS OF SALES LOCATED ON THE ATMEL WEBSITE, ATMEL ASSUMES NO LIABILITY WHATSOEVER AND DISCLAIMS 
ANY EXPRESS, IMPLIED OR STATUTORY WARRANTY RELATING TO ITS PRODUCTS INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. IN NO EVENT SHALL ATMEL BE 
LIABLE FOR ANY DIRECT, INDIRECT, CONSEQUENTIAL, PUNITIVE, SPECIAL OR INCIDENTAL DAMAGES (INCLUDING, WITHOUT LIMITATION, 
DAMAGES FOR LOSS AND PROFITS, BUSINESS INTERRUPTION, OR LOSS OF INFORMATION) ARISING OUT OF THE USE OR INABILITY TO 
USE THIS DOCUMENT, EVEN IF ATMEL HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

 Atmel makes no representations or 

warranties with respect to the accuracy or completeness of the contents of this document and reserves the right to make changes to specifications and 
product descriptions at any time without notice. Atmel does not make any commitment to update the information contained herein. Unless specifically 
provided otherwise, Atmel products are not suitable for, and shall not be used in, automotive applications. Atmel products are not intended, authorized, or 
warranted for use as components in applications intended to support or sustain life.

 

 

 

 

 

 

 

 

 

 

 

 

Summary of Contents for AVR262

Page 1: ...ability for different AVR USB devices Supports IAR and GCC 1 Introduction This application note illustrates how to use the QTouch Library on the AT90USB646 microcontroller to provide a single chip sol...

Page 2: ...2 Atmel AVR262 8375A AVR 03 11 2 Hardware requirements Atmel STK 600 Atmel STK525 or custom board Atmel QTouch sensor board USB host...

Page 3: ...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 tra...

Page 4: ...Touch data in report byte When a touch is sensed on a sensor connected to PA0 PA1 the value of the report byte is 0x01 and when it is sensed at PC4 PC5 the value is 0x40 The report byte values for th...

Page 5: ...root folder The library selection guide is also available on the Atmel website Select the technology as QTouch the MCU family as USB AVR the MCU type as 8 bit the MCU as Atmel AT90USB646 the tool chai...

Page 6: ...ese custom compilation options one by one refer to Figure 5 1 D_QTOUCH_ DQT_NUM_CHANNELS 8 DSNS1 A DSNSK1 A DSNS2 C DSNSK2 C DQT_DELAY_CYCLES 5 D_SNS1_SNSK1_SAME_PORT_ D_SNS2_SNSK2_SAME_PORT_ DQTOUCH_...

Page 7: ...Atmel AVR262 7 8375A AVR 03 11 Figure 5 2 IAR compiler options Figure 5 3 IAR assembler options...

Page 8: ...he help of a block diagram Figure 6 1 Firmware architecture The touch sensing and report generation are handled in hid_task c and touch_task c and their respective header files The various related fun...

Page 9: ...NEL_2 AKS_GROUP_1 10u HYST_6_25 qt_enable_key CHANNEL_3 AKS_GROUP_1 10u HYST_6_25 qt_enable_key CHANNEL_4 AKS_GROUP_1 10u HYST_6_25 qt_enable_key CHANNEL_5 AKS_GROUP_1 10u HYST_6_25 qt_enable_key CHAN...

Page 10: ...by the user qt_set_parameters configure timer ISR to fire regularly init_timer_isr 6 2 Touch library APIs 6 2 1 touch_measure The touch_measure function is responsible for measuring the touch sensing...

Page 11: ...he value of the touch_data variable changes and the host is updated with the new status Usb_select_endpoint EP_HID_IN if Is_usb_write_enabled return Not ready to send report if touch_data old_touch_da...

Page 12: ...note includes a GUI based PC host application that can be used to display which key is pressed or released The PC executable is available in the associated deliverables The respective key press or ke...

Page 13: ..._id 2725 Atmel AVR QTouch Library 4 3 http www atmel com dyn products tools_card asp tool_id 4627 Atmel AVR QTouch Library User Guide http www atmel com dyn resources prod_documents doc8207 pdf AVR328...

Page 14: ...tions 6 6 Firmware 8 6 1 Functions related to initialization 9 6 1 1 config_keys 9 6 1 2 CHANNEL_t 9 6 1 3 AKS_GROUP 9 6 1 4 10u 9 6 1 5 HYST_6_25 9 6 1 6 qt_init_sensing 9 6 1 7 qt_set_parameters 9 6...

Page 15: ...his document or in connection with the sale of Atmel products EXCEPT AS SET FORTH IN THE ATMEL TERMS AND CONDITIONS OF SALES LOCATED ON THE ATMEL WEBSITE ATMEL ASSUMES NO LIABILITY WHATSOEVER AND DISC...

Reviews: