Download Print this page

Advertisement

Quick Links

Introduction
Getting Started with STK200 Dragon
This guide is designed to get you up and running with main software and
hardware. As you work through it, there could be lots of details you do not
understand, but these are covered in books and other documentation that you
can read later.
The main software package is AVRStudio, which is Atmel's Integrated
Development Environment or IDE. There is also a plugin C Compiler module
called WinAVR that compiles C programs within AVRStudio. The Kanda
installer will install these packages and copy documentation to a folder on
your hard drive.
Default install path is C:\Program Files\STK200 Dragon
AVRStudio has its own Atmel-AVR Tools folder in Program Files, and can be
run from there or you can run from desktop icon.
WinAVR never needs to be run directly, only from AVRStudio.
The AVRStudio IDE is designed for writing source code, in C (.c files) or
assembler (.asm files). These are then built or compiled into object code (.hex
files) for programming into the AVR using ISP or debug files (.elf files) to step
through the code.
The AVR Dragon hardware is a programmer and In Circuit Emulator (ICE) in
one tool. Once source code is built, it can be programmed into the AVR using
ISP, which will just run the code or it can be set in Debug mode (using
DebugWire or JTAG )that allows you to examine the code operation to find
bugs.
There are two Debug methods depending on the AVR device you are using
JTAG Mode for AVR devices with 40-pins or more
DebugWire for smaller pin-count devices.
In System Programming is common to all AVR devices, using serial
programming (ISP). Devices with JTAG can be programmed through JTAG as
well as ISP.
This guide describes the hardware setup for ISP, DebugWire and JTAG, with
associated AVRStudio software operations. The default AVR supplied is an
Atmega16. As this is a 40-pin device, it uses JTAG for debugging. Although it
can also be programmed through JTAG, we suggest you use ISP first to
familiarise yourself with standard programming.
There is a brief guide to the books and documentation at the end of this guide
as well as links to Atmel site, where more information is available about AVR,
AVRStudio and AVR Dragon.

Advertisement

loading

Summary of Contents for KANDA STK200 Dragon

  • Page 1 The main software package is AVRStudio, which is Atmel’s Integrated Development Environment or IDE. There is also a plugin C Compiler module called WinAVR that compiles C programs within AVRStudio. The Kanda installer will install these packages and copy documentation to a folder on your hard drive.
  • Page 2 Creating an AVR AVR Studio Dragon Project AVR Studio is Atmel’s development environment. The Kanda installer will install AVRStudio, service packs for AVRStudio and WinAVR C Compiler, unless you choose not to because you have them already. This is a brief guide to using one of the sample files in AVR Studio, but more information is available in the AVRStudio Getting Started guide and at www.atmel.com...
  • Page 3 Now the project is created, we need to add a sample file. 1) The Project is displayed at the left of the screen. Right click on the Project name and choose Add Files to Project 2) Select an assembler file from Assembler Sample Code folder, such as LedFlash200.asm.
  • Page 4: Hardware Connections For Isp And Debugwire

    Hardware Connections for ISP and DebugWire DebugWire is used for debugging smaller pin count devices from AVRStudio. Using ISP ISP or In System Programming is used for programming devices from AVRStudio, or another programmer. There is a 6-pin pin-header on AVR Dragon board labeled ISP. Connecting AVR Dragon Connect the 6-way adapter to this header as shown, with key way facing...
  • Page 5 Connect the 10-way ribbon cable to this adapter and into the 10-way box header on STK target board. The complete ISP or DebugWire connection looks like this: Connect the AVR Dragon to a USB port on your computer. The New Hardware Wizard will appear, just follow instructions to install driver.
  • Page 6 Powering STK200 Board The AVR Dragon is self-powered from USB bus, and in most circumstance it STK200 can also be used to power the STK200 board using the two wires supplied. Board Power Unless you add extra circuitry, the STK200 board will draw less than the Connection 100mA that the USB can supply.
  • Page 7 Make sure hardware is connected as shown above for ISP and DebugWire. Programming from AVRStudio Go to Tools Menu > Program AVR > Auto Connect. This will bring up programmer dialog box. If you get a Connect Failed, then this Dialog will appear. Make sure AVR Dragon is set as platform and your connections are all ok and try Connect button.
  • Page 8 Make sure that Programming Mode is set to ISP mode. It may come up as JTAG mode on some AVR devices. Side Note: If you want to program using JTAG, set Programming Mode to JTAG and use hardware JTAG connections – see JTAG Connections section Check device type matches and try Read Signature Byte.
  • Page 9 DebugWire is the onboard debugger for smaller pin count AVR devices, with DebugWire with less than 40-pins. Hardware connections are same as already set for ISP, AVR Dragon except jumper on adapter PCB should be OFF, see ISP section. After building your project successfully, Choose Debug > Start Debugging or use Build and Run, which will launch AVR Dragon after compile.
  • Page 10 Fit the correct adapter to the correct port header, with the back of the adapter PCB facing out from the board Fit the 10-way cable to the adapter and connect it to header marked JTAG on AVR Dragon, with keyway facing prototype area.
  • Page 11: Other Documents

    Occasionally, you may need to restart PC to reset everything, but usually just closing AVRStudio works. Other Documents The Kanda installer will copy a range of documents to a folder called STK200 Dragon in your Program Files folder. Folder Description •...
  • Page 12: Atmel Website

    Atmel who manufacture the AVR and produce AVRStudio are a very good Atmel Website source of information. Visit for new versions of AVRStudio, www.atmel.com application notes, new AVR devices and much more. Contact Kanda Contact Kanda at support@kanda.com or visit our website at www.kanda.com Phone/fax is +44 (0)1974 261 273...