Advertisement

Quick Links

Atmel AVR8015: QT600 - AT32UC3L QMatrix

Features

• Knowledge level: Intermediate
• PC platform: Windows
• Hardware requirements:
®
TM
- Atmel
QT
600 (entire kit)
- USB cables
• Software requirements:
®
- Atmel AVR
QTouch
- Atmel QTouch Library 4.4 or later
®
- Atmel AVR Studio
• Estimated time to complete all tasks in this guide: 1 day

1 Introduction

The purpose of this training is to get familiar with the
developing and debugging any Atmel Touch application. It includes four core
solutions:
Atmel QTouch
Library, and
Atmel AVR Studio
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 C 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
UC3 families of microcontrollers, and three touch sensor boards supporting up to
64-channels.
Training Guide
®
2000, Windows XP, Windows Vista
®
Studio 4.3.1 or later
5 (latest version)
Studio,
Atmel QT™600 Development
5.
®
, Atmel AVR XMEGA
®
, Win7
Atmel AVR QTouch Suite
Kit,
Atmel QTouch
®
and 32-bit Atmel AVR
32-bit Atmel
Microcontrollers
Application Note
for
Rev. 32185A-AVR-01/12

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the AVR8015 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for Atmel AVR8015

  • Page 1: Features

    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 ®...
  • Page 2: Document Overview

    ® The Atmel QT600 MCU boards can be connected to the Atmel STK 600 for easy access to unused I/O-pins. STK600, however, is not needed for the QT600 kit to function properly. QT600 is fully supported by Atmel AVR QTouch...
  • Page 3: Requirements

    • QT600 MCU Board • Touch Sensor Board Figure 3-1. QT600 system. The MCU board and touch sensor boards together comprise the user touch system. The QT600 interface board is used to stream live touch data from the Atmel AVR 32185A-AVR-01/12...
  • Page 4: Block Diagram

    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. Pin schematic. Atmel AVR8015 32185A-AVR-01/12...
  • Page 5: Assignment

    • From the same webpage where you found this application note download and expand the associated zip file (disk icon). Project folders for each task will be relative to where you expanded the zip file {AVR8015}. File paths will be relative to the expanded task folder where each project should be created •...
  • Page 6 • Touch Data LED green: Touch Debug mode (default mode after power-up) • Touch Data LED off: Programmer mode Launch the AVR Programming tool on Atmel AVR Studio 5 and program the device. Use AVR Studio 5.0 or later. Programming output file using AVR Studio 5.
  • Page 7 Atmel AVR8015 Figure 4-2. Selecting the device. 4. Click on Device ID Read option and also on Target Voltage Read option. Ensure 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.
  • Page 8: Connecting The Hardware

    1. Connect the USB cable to the Atmel QT600 interface board. 2. Make sure the VTG header is mounted on the QT600 interface board. 3. Connect the TOUCH DATA header of the QT600 interface board and Atmel QT600-AT32UC3L-QM64 board. 4. Connect the JTAGICE mkII and the QT600-AT32UC3L-QM64 board through the aWire interface as described in Section 4.1.1.
  • Page 9 11. For Atmel AT32UC3L: Use the QMatrix 8x8 Panel. 12. Launch Atmel QTouch Studio. 13. Plug the USB cable in to the Atmel QT600 interface board. Atmel QTouch Studio should now automatically connect to the kit. Touch data LED on USB interface board now starts blinking.
  • Page 10: Task 2: Set Up A New Project, Select And Include Library, Add Touch Files And Asf Driver Files

    4.2.2 Setting up the code Create a new project. 1. Open Atmel AVR Studio and create a new project. If AVR Studio is already running, then use File → New → Project. 2. Select project type AVR GCC, select C Executable project from installed templates and set project name to Task 2.
  • Page 11 Atmel AVR8015 Figure 4-9. New project. Set the MCU type. 1. Select Device family as AVR UC3, 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.
  • Page 12 ..\..\Exercises\QMatrix\Tasks\Task 2 User can ignore the above steps in Section 4.2.2, if he intends to use the Task 2 project available inside Exercises folder. Figure 4-12. Including the main.c. Test compile to ensure all tools are installed OK. Atmel AVR8015 32185A-AVR-01/12...
  • Page 13 QMatrix Tab (we are using Atmel QMatrix). Similarly, for Atmel QTouch, click on the tab for QTouch. 2. Select the technology as QMatrix, MCU family as Atmel AT32UC3, MCU type as 32-bit, MCU as Atmel AT32UC3L, the Tool chain as GCC, Ports available for QMatrix as CAT CSA-CSB GPIO function Maximum number of channels as 136, Maximum number of rotors or sliders as 34.
  • Page 14 1. To use the touch keys, first we need to add #include “ ” to touch_api_at32uc3l.h our list of include files. This will make the Atmel QTouch Library API available. 2. Add it under the following comment in the file main.c...
  • Page 15 Atmel AVR8015 4. Click on directories option under AVR/GNU C compiler and enter the path where file is found. This file is found in the include folder touch_api_at32uc3l under Exercises. 5. Similarly, click on Directories and add the path for touch_config_at32uc3l.h...
  • Page 16 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 Atmel AVR Studio 5. 2. Go to Project properties → Toolchain, in the Configuration tab select All configurations from the drop down list.
  • Page 17 Atmel AVR8015 Figure 4-19. Selecting drivers from ASF. 4. ASF Driver Selection-No defined board warning occurs. Press OK to continue. This 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.
  • Page 18 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 files. Figure 4-22. Summary of operations for selected options. Atmel AVR8015 32185A-AVR-01/12...
  • Page 19: Task 3: Create A Virtual Kit In Design Mode And Verifying The Pin Configuration

    4.3 Task 3: Create a virtual kit in design mode and verifying the pin configuration Create a virtual kit. 1. Launch Atmel QTouch Studio. Select Design Mode. 2. Design mode shall provide editable virtual kit. It allows users to add buttons, wheels, sliders, and kit background image and select kit technology (QTouch or QMatrix).
  • Page 20 Note down the Project ID. 8. Click on each sensor and adjust the height and width accordingly in the kit/sensor configuration window. Refer to Figure 4-26. Figure 4-26. Design mode. 9. Save the design in the same Task 3 folder. Atmel AVR8015 32185A-AVR-01/12...
  • Page 21 Atmel AVR8015 10. Notice that the wheel has been assigned to channels 0-3. 11. Notice the toolbar on the top left corner of the virtual kit window which is shown in Figure 4-26 is used for adding wheels, sliders and buttons. Click on those icons to add the corresponding sensor.
  • Page 22: Task 4: Configure The Global Options And Enable/Set The Sensors

    /* options for waveform generation. */ static const tc_waveform_opt_t WAVEFORM_OPT = { .channel = EXAMPLE_TC_CHANNEL, /* Channel selection. */ .bswtrg = TC_EVT_EFFECT_NOOP, /* Software trigger effect on TIOB. */ .beevt = TC_EVT_EFFECT_NOOP, /* External event effect on TIOB. */ Atmel AVR8015 32185A-AVR-01/12...
  • Page 23 Atmel AVR8015 .bcpc = TC_EVT_EFFECT_NOOP, /* RC compare effect on TIOB. .bcpb = TC_EVT_EFFECT_NOOP, /* RB compare effect on TIOB. .aswtrg = TC_EVT_EFFECT_NOOP, /* Software trigger effect on TIOA. */ .aeevt = TC_EVT_EFFECT_NOOP, /* External event effect on TIOA. */ .acpc = TC_EVT_EFFECT_NOOP,...
  • Page 24 ’ is the channel number assigned to a particular button. Place this under the label /* Configure 8 single channel keys as Sensor's 2-9. */. This tells Atmel QMatrix that the sensor corresponding to the particular sensor id should be treated as a key and is assigned the channel.
  • Page 25 Atmel AVR8015 Place this piece of code under the label /* Configure a 4 channel Slider as Sensor 1. */ Similarly configure the other sliders under the corresponding labels. NOTE The RES_8_BIT argument is the slider resolution. 3. Similarly, for enabling the rotor using channels 0, 1, 2, and 3 using the following...
  • Page 26: Further Explanation

    Most of the function calls used in this task are quite simple and self explanatory. The most complex line is the function, so let’s look closer at touch_qm_sensor_config() this: touch_ret_t touch_qm_sensor_config (sensor_type_t sensor_type, channel_t from_channel, channel_t to_channel, aks_group_t aks_group, threshold_t detect_threshold, hysteresis_t detect_hysteresis, resolution_t position_resolution, uint8_t position_hysteresis, sensor_id_t * p_sensor_id); Atmel AVR8015 32185A-AVR-01/12...
  • Page 27: Task 5: Use Of The Debug Interface

    2. The debug interface is used to communicate various touch sensor information to a computer running Atmel QTouch Studio. 3. In the solution explorer tab in Atmel AVR Studio, right click the project and select Add Existing File, and then select the above mentioned source files and the corresponding header files from Task 5 folder.
  • Page 28: Task 6: Analysis Mode

    3. Program the code. 4. Unplug the squid programming cable that is connected between Atmel QT600 MCU board and the Atmel AVR JTAGICE mkII. Insert the 10-pin cable for streaming touch data. 5. Launch Atmel QTouch Studio and switch to Analysis mode.
  • Page 29: Configuring The Kit/Sensors

    Atmel AVR8015 QTouch Kit when it is connected to the PC. Using this information, the image of the kit will be updated. As explained during Task 1, sensors displayed in a light grey color are inactive, and sensors displayed in a light brown color are active sensors. Whenever a touch to an active sensor is detected a filled circle indicating where the user touches the sensor is drawn.
  • Page 30 It has a range of between 3 and 255. For more details on all the configuration parameters, please refer to 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.
  • Page 31: Task 7: Design Validation

    4.7.2 Using the design validation 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.
  • Page 32: Task 8: Log And Analyze Data

    4.8 Task 8: Log and analyze data Logging the data. 1. If the Auto-start Reading option is checked, then Atmel QTouch Studio will automatically start reading touch data when a kit is connected. 2. If unchecked, you must click the Start Reading button to make QTouch Studio start reading touch data.
  • Page 33: Summary

    Atmel AVR8015 5 Summary The main goal with this hands-on training was to learn how to use Atmel QT600 set up and use the Atmel QTouch suite (with Atmel AVR Studio 5) and the QT600 kit. • Set up the hardware •...
  • Page 34: Atmel Technical Support Center

    6 Atmel technical support center Atmel has several support channels available: • Web portal: http://support.atmel.no/ All Atmel microcontrollers • Email: touch@atmel.com All 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: •...
  • Page 35: Table Of Contents

    2 Document overview ................. 2 3 Requirements ................... 3 3.1 Software ......................3 3.2 Hardware ......................3 3.3 Atmel QT600 system description ................ 3 3.3.1 Block diagram......................4 3.3.2 Pin schematic ......................4 4 Assignment ..................5 4.1 Task 1: Connect the tools and run a test application .......... 5 4.1.1 Introduction........................
  • Page 36 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...

This manual is also suitable for:

Qt600At32uc3l qmatrix

Table of Contents