ATMEL AVR1016 User Manual

http://www.BDTIC.com/ATMEL
AVR1016: AVR Training QTouch Xplained
Prerequisites
Knowledge level: Intermediate
PC Platform: Windows® 2000, XP, Vista
Hardware requirements:
- JTAG ICE mkII
- Xplain Kit
- Atmel
Software requirements:
- Atmel
- (Atmel QTouch Studio, Optional)
- Latest version of WinAVR
- Atmel QTouch
Time consumption: ~3 hours

Introduction

The purpose of this training is to get familiar with the Atmel QTouch Library 4.0 and how to use it in your own applications.
This hands-on consist of a number of tasks. The first task shows how to connect everything and assure that your hardware is working properly. The second task explains how to set up a project and configure simple Atmel QTouch buttons. The next task show how to configure a more advanced sensor and how to use the debug interface in order to take advantage of the live debugging features of QTouch Studio.
®
QTouch® Xplained board
®
AVR Studio® 4 (latest version)
®
Library (latest version)
8-bit Microcontrollers
Application Note
Basics for Atmel AVR Studio, WinAVR or tools use are not covered.
Rev. 8304A-AVR-04/10

Document Overview

http://www.BDTIC.com/ATMEL
The hands-on is split into several different assignments. Each assignment is further divided into individual sections to simplify understanding.
Throughout this document you will find some special icons. These icons are used to identify different sections of assignments and ease complexity.
Information
Delivers contextual information about a specific topic
Tip
Highlights useful tips and techniques
To do
Highlights objectives to be completed
Result
Highlights the expected result of an assignment step
Warning
Indicates important information
2
AVR1016
8304A-AVR-04/10

Table of Contents

http://www.BDTIC.com/ATMEL
AVR1016
AVR Training: QTouch Xplained........................................................ 1
Prerequisites.......................................................................................1
Introduction.........................................................................................1
Document Overview ........................................................................... 2
Table of Contents................................................................................3
1 Requirements...................................................................................4
1.1 Software ..............................................................................................................4
1.2 Hardware............................................................................................................. 4
1.3 Xplain board ........................................................................................................5
2 Assignments .................................................................................... 6
2.1 Task 1: Connecting tools and run a test project.................................................. 6
2.1.1 Introduction................................................................................................................ 6
2.1.2 Tasks......................................................................................................................... 6
2.2 Task 2: Simple Buttons .......................................................................................8
2.2.1 Introduction................................................................................................................ 8
2.2.2 Setting up the code ................................................................................................... 8
2.2.3 Further explanation ................................................................................................. 11
2.3 Task 3: Adding Slider and Debug Interface ......................................................12
2.3.1 Introduction.............................................................................................................. 12
2.3.2 Adding a slider......................................................................................................... 12
2.3.3 Using the Debug Interface....................................................................................... 14
3 Summary.........................................................................................17
4 Atmel Technical Support Center .................................................. 17
8304A-AVR-04/10
3
1 Requirements
http://www.BDTIC.com/ATMEL

1.1 Software

1.2 Hardware

Make sure you install the latest versions of
AVR Studio
Atmel QTouch Studio 4.0.1 or newer (optional)
WinAVR GCC
Atmel QTouch Library
In this hands-on we are going to use:
Xplain kit w/ USB cable
QTouch Xplained top card
JTAGICE mkII w/ USB cable
4
AVR1016
8304A-AVR-04/10

1.3 Xplain board

http://www.BDTIC.com/ATMEL
AVR1016
The Xplain kit is a small simple training kit that was designed to allow designers a simple way to test the ATxmega128A1.

1.3.1 Xplain board Schematics

USB to PC
Pin schematics:
PORTA[n]
SNSK
5
67
PA[7..0] & PD[7..0]
2
3
4
XMEGAUSB AVR SPI
Cs
1
0
220R
PE[7..0]
PF[7..0]
PORTD[n]
8304A-AVR-04/10
SNS
5
http://www.BDTIC.com/ATMEL

2 Assignments

2.1 Task 1: Connecting tools and run a test project

2.1.1 Introduction

2.1.2 Tasks

This task i intended. No code writing is needed for this task.
s designed to make sure all the tools are connected and working as
Preparing software
1. Install the soft ware required for this training a. Atmel AVR Studio (if you d o not have the latest version) b. Atmel QTou ch Studio (optional) c. Atmel QTouch Libraries d. WinAVR
2. Extract the file archive attached to this training document to a local folder.
Flashing the Xplain board
1. The bridge chip firmware needs to be programmed to the AT90USB1287
device on the Xplain board. This can be done in two ways:
a. Program the AT90USB1287 with a JTAGICEmkII programmer.
Connect the programmer to the port labeled JTAG USB on the Xplain board. Locate the file USB_Bride_V3.3_646.a90 in the Firmware folder and write this file to the USB device. Warning: If you program the USB bridge firmware using the JTAG, it will override the bootloader. It advised that you make a backup of the original program.
b. Program the AT90USB1287 using the Atmel Flip software and a
bootloader. If your USB device has a bootloader present, which it should by default, you can program it without using a programmer. Instead you can use Atmel Flip which can be downloaded for free from the Atmel website. Before launching Flip, be sure to short out pins 1 and 2 on the JTAG USB header, this will enable the bootloader. Locate the file USB_Bride_V3.3_646.a90 and use Flip to write this file to the USB device. This will preserve the bootloader.
1. Now the Atmel
with the example application firmware. Connect your programmer to the ATxmega128A1 via the JTAG&PDIXMEGA port, then program it with the file Example.hex. Note that this step requires a programmer and can not be done with a bootloader.
®
AVR® XMEGATM device on the Xplain needs to be flashed
6
AVR1016
8304A-AVR-04/10
Loading...
+ 11 hidden pages