background image

 

 

 

 

Atmel AVR8015: QT600 - AT32UC3L QMatrix 

Training Guide 

Features 

• 

Knowledge level: Intermediate 

• 

PC platform: Windows

®

 2000, Windows XP, Windows Vista

®

, Win7 

• 

Hardware requirements: 

Atmel

®

 QT

TM

600 (entire kit) 

USB cables 

• 

Software requirements: 

Atmel AVR

®

 QTouch

®

 Studio 4.3.1 or later 

Atmel QTouch Library 4.4 or later 

Atmel AVR Studio

®

 5 (latest version) 

• 

Estimated time to complete all tasks in this guide: 1 day 

1 Introduction 

The purpose of this training is to get familiar  for 

developing and debugging any Atmel Touch application. It includes four core 
solutions: 

, and 

Atmel QTouch Studio - Touch Analyzer 

QTouch Studio is the front-end software used to display and evaluate the data 
reported by the QT600 development kit. 

Atmel QTouch Library - Touch SW library for AVR 

The QTouch Library is a software library for developing touch applications on 
standard Atmel AVR microcontrollers. Customers can link the library into their 
firmware in order to integrate touch-sensing capability into their projects. 

Atmel AVR Studio 5 - Debugger and Programmer 

AVR Studio 5 is a professional Integrated Development Environment (IDE) for 
writing, simulating and debugging applications for AVR microcontrollers. It also 
comprises the programming interface for all AVR tools. It has the following 
features: 

  Supports all 8- and 32-bit AVR 

 Integrated 

compiler 

  New project wizard and Intelligent Editor 

Atmel QT600 - Touch Hardware Kit and example Code 

The QT600 is a complete touch development kit for buttons, sliders and wheels. 
This advanced development platform allows designers to experiment with Atmel 
touch technology, and provides the easiest way to analyze and validate touch 
products. It supports both Atmel QTouch and Atmel QMatrix acquisition methods. It 
comes with one USB-powered interface board, MCU boards representing the 
Atmel tinyAVR

®

, Atmel megaAVR

®

, Atmel AVR XMEGA

®

 and 32-bit Atmel AVR 

UC3 families of microcontrollers, and three touch sensor boards supporting up to 
64-channels. 

 

 

32-bit Atmel 

Microcontrollers 

 

Application Note 
 
 
 

Rev. 32185A-AVR-01/12 

Содержание AT32UC3L QMatrix

Страница 1: ...microcontrollers Customers can link the library into their firmware in order to integrate touch sensing capability into their projects Atmel AVR Studio 5 Debugger and Programmer AVR Studio 5 is a prof...

Страница 2: ...files and code to use the debug interface in order to take advantage of the live debugging features of QTouch Studio 6 Use the Analysis mode and a review brief description of the various parameters 7...

Страница 3: ...8x8 Touch Sensor board Debugger Atmel AVR JTAGICE mkII with squid cable NOTE AVR JTAGICE mkII with hardware revision 0 does NOT have aWire capabilities Hence AVR JTAGICE mkII other than hardware revi...

Страница 4: ...5 32185A AVR 01 12 MCU mounted on the MCU board Atmel QTouch Studio is used as the PC front end to visualize the touch data 3 3 1 Block diagram Figure 3 2 Block diagram 3 3 2 Pin schematic Figure 3 3...

Страница 5: ...uction This task is designed to make sure all the tools are connected and working as intended No code writing is needed for this task You can load the Hex file uc3l_gnu_qm_qt600 hex present at the loc...

Страница 6: ...AVR Studio 5 Hex file or Elf file can be loaded into the target board by following the below steps 1 In studio5 IDE select and click on Tools AVR Programming option as shown in Figure 4 1 2 Switch th...

Страница 7: ...re that the target voltage as per the device datasheet Minimum voltage is 1 8V Also ensure that Device ID and target voltage are read by the IDE as shown in Figure 4 3 Figure 4 3 Setting device ID 5 S...

Страница 8: ...QM64 board 4 Connect the JTAGICE mkII and the QT600 AT32UC3L QM64 board through the aWire interface as described in Section 4 1 1 Figure 4 5 Squid connection 5 Make sure that the QT600 interface board...

Страница 9: ...s shows that data is being sent by the sensor board 14 Select Analysis mode and then press the Start Reading button You should now be able to view the touch data signals and the state of each sensor R...

Страница 10: ...Introduction In this task we will create a new project We will add the necessary libraries touch files and assembler files 4 2 2 Setting up the code Create a new project 1 Open Atmel AVR Studio and cr...

Страница 11: ...C3 32 bit part number as AT32UC3L064 or AT32UC3L0256 and then click OK as shown in Figure 4 10 Figure 4 10 Selecting the device Add the main c file In the solution explorer window 1 Select and right c...

Страница 12: ...d the existing main c source file to the project as shown in Figure 4 12 main c location is Exercises QMatrix Tasks Task 2 User can ignore the above steps in Section 4 2 2 if he intends to use the Tas...

Страница 13: ...orts available for QMatrix as CAT CSA CSB GPIO function Maximum number of channels as 136 Maximum number of rotors or sliders as 34 As you can see it shows the appropriate library file to be included...

Страница 14: ...15 represents the same Missing the above step causes build error Build error shows that the corresponding file is not found Figure 4 15 Included library file path with respect to release folder locat...

Страница 15: ...path depends upon the location of the file If the file to be included and project folder Task 2 in this case are in the same drive relative path is a path relative to the output file of the applicati...

Страница 16: ...Included directories in debug profile Adding drivers from ASF 1 We need to add the necessary driver files to the project This can be done by adding the drivers from the AVR Software Framework using At...

Страница 17: ...his opens the driver selection wizard See Figure 4 20 Figure 4 20 No board defined warning 5 Add the following modules and press Next to continue o CPU PM Power Manager Driver o GPIO General Purpose I...

Страница 18: ...selection wizard 6 Next a summary of operations for the selected options will be displayed You can see that the necessary include paths are being added Press Finish to finish adding the ASF driver fil...

Страница 19: ...olchain AVR GNU C Compiler Optimization Please ensure the optimization level is configured in the project Now save and build the project and if all the steps mentioned above have been followed you sho...

Страница 20: ...training select QMatrix as the kit technology Under sensors select the number of buttons as 0 wheel as 1 and slider as 0 6 For the background image select the image provided in the Task 3 folder name...

Страница 21: ...l kit Refer to Figure 4 27 Figure 4 27 Adding a slider and wheel 14 Ensure that the channel numbers are assigned in the following sequence Wheel 0 0 3 Slider 0 4 7 Button group 3 to 10 8 15 Wheel 1 16...

Страница 22: ...t up some runtime global QMatrix parameters For this add the following macros under the label QMATRIX GLOBAL SENSOR CONFIGURATION INFO in the structure static touch_qm_config_t qm_config QM_DI QM_NEG_...

Страница 23: ...compare enetrg 0u External event trigger enable eevt 0u External event selection eevtedg TC_SEL_NO_EDGE External event edge selection cpcdis 0u Counter disable when RC compare cpcstop 0u Counter clock...

Страница 24: ...or_config SENSOR_TYPE_KEY channel_t i channel_t i AKS_GROUP_1 20u HYST_6_25 RES_1_BIT 0u sensor_id if touch_ret TOUCH_SUCCESS while 1u Check API Error return code Where i is the channel number assigne...

Страница 25: ...ensors touch_ret config_64ch_touch_keys_rotors_sliders if touch_ret TOUCH_SUCCESS while 1u Check API Error return code Configuring burst length 1 Call qm_burst_length to configure the burst length arr...

Страница 26: ...ter the label Filter callback function pointer We are now ready to perform a touch measurement Inside the main loop under the label Start a touch sensors measurement process add the following piece of...

Страница 27: ...ing up the code Add the source files QDebug c QDebugTransport c SPI_Master c These source files with the corresponding header files are present in Task 5 folder 1 QDebug c QDebugTransport c and SPI_Ma...

Страница 28: ...when Touch measurement process is completed QDebug_SendData p_qm_measure_data acq_status 7 In main c call the function QDebug_ProcessCommands under the label Process any commands received from QTouch...

Страница 29: ...on window select Button0 and configure the AKS Group as AKS_GROUP_1 2 Similarly configure all the sensors as AKS_GROUP_1 3 Now if you touch more than 1 button at the same time only one is detected In...

Страница 30: ...the Atmel QTouch Library User Guide Maximum ON duration 1 Click on the View Menu and click on Graph View The QTouch Graph view window opens 2 Select data set for channel 7 and observe what happens on...

Страница 31: ...n wizard 1 Connect the kit and start a touch debug session 2 Launch Atmel QTouch Studio and start the design validation wizard from the Tools menu Figure 4 31 Selecting design validation wizard 3 The...

Страница 32: ...it 3 As soon as reading has stopped either because the user has clicked on the Stop Reading button or the kit has been disconnected from the PC a dialog will popup to let the user specify a location a...

Страница 33: ...pin configuration wizard and configure technology options Configure global options and enable sensors Add buttons sliders and wheels Use Analysis mode Use Design validation wizard Log and analyze data...

Страница 34: ...Atmel touch products Email avr atmel com All Atmel AVR products Email avr32 atmel com All 32 bit Atmel AVR products Please register on the web portal to gain access to the following services A rich F...

Страница 35: ...10 4 2 1 Introduction 10 4 2 2 Setting up the code 10 4 3 Task 3 Create a virtual kit in design mode and verifying the pin configuration 19 4 4 Task 4 Configure the global options and enable set the...

Страница 36: ...ight 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...

Отзывы: