Skip to content


AVR Dragon: Getting Started

DragonVertical In this article Jacob Woj continues with his getting started with Microcontroller projects theme. In this third article Jacob helps us get started with the AVR Dragon. The AVR Dragon is a great tool for AVR development. It is the perfect companion to Atmel AVR Studio and AVR-GCC.

More getting started with microcontrollers articles at uCHobby:

Full article after the jump

So you want to use an AVR Dragon, but do not know where to start. Either that is the scenario, or you just felt that this would be a useful article to read. Regardless of your motives, this article is geared towards teaching you all of the same basic stuff about the Dragon. This article will not cover the actual debugging process (which is going to be a whole other article), but rather the setup and handling of the AVR Dragon. Unlike most other Atmel programming product, the Dragon is not ready to use out of the box, or at least all of its features are not available for use out of the box. There are a number of modifications that must be made, and steps that must be taken, prior to getting them working.

Basic Info

The AVR Dragon is a programming and debugging tool created by Atmel. The Dragon gives you the option of programming through three interfaces – ISP, JTAG, or HV (High Voltage) programming. It also contains an unfinished ‘prototyping’ area. The AVR Dragon is relatively low. The Dragon is one of the few Atmel products without a case, as an unprotected PCB. This means you will have to be more careful when handling it in order to avoid damaging it through static.

clip_image002

Fig. 1 The AVR Dragon is not much larger than a business card.

Setup

In order to take advantage of the onboard ‘prototyping’ area, a couple of through-hole parts are needed to be soldered in. The configuration that I chose, which seems fairly versatile, consists of:

28-pin IC Socket

Two 20-pin (1×20) female headers

20-pin (2×10) male header

40-pin (2×20) female header

There is not very much to explain as to how they should be soldered in – each part will only fit into one place. Once complete, you will have space to insert both wide and narrow AVR’s and you will also be able to take advantage of the HV programming mode.

In addition to these parts, there are a few other prerequisites.

Prerequisites

The main hardware requirement for using the AVR Dragon is a set of ribbon cable assemblies. These are required to connect the male header interfaces to the female ‘Expand’ header, which connects directly to the chips. In order to use all of the interfaces you will need the following cables:

– Two 6-pin (2×3) cables

– One 10-pin (2×5) cables

– One 20-pin (2×10) cables

The cables should have a standard female connector on one end, and individual male pins on the other. They should be no longer than six inches – the shorter the better. The reason why two 6-pin cables are required is because the Dragon has a regulated power supply header built in, which consists of 3 pins of both VCC and GND. I was unable to find these in a local store, so I had to improvise with some IDC sockets, a floppy cable, some spare wires, and a lot of poorly applied solder.

On top of the ribbon cables, you will also need a USB Type-B to USB (regular) cable as one is not included with the Dragon. It is also recommended that you use a self-powered (one with a wall-wart) USB hub rather than connecting the Dragon straight to your computer. Reason for this is that the engineers at Atmel made the grave mistake of not making the USB power requirements of the Dragon match those of a standard USB port. USB ports on most computers are limited to outputting half an amp (500mA) of current while the Dragon may require up to 850mA of current at times. This can possibly lead to serious damage to the Dragon – so better safe than sorry. It is also recommended that the Dragon is not powered up with the power header connected to a chip as it can also cause problems related to too much current being drawn at once.

Software

The standard suite for the Dragon is AVR Studio (current version is 4.15), which works under Windows. While I have no experience under Mac or Linux, I have heard that AVRDude can be used. AVR Studio limits the Dragon to debugging the first 32k of code in a project. The most likely reason for this limitation is so it does not compete with the higher priced Atmel JTAG ICE mkII. A third-party driver file has been released to bypass this limitation, as the limitation is applied in AVR Studio and not on the Dragon itself. As for firmware, an update for the Dragon is available, so you will probably be prompted to downloading it upon connecting to AVR Studio. AVR Studio will not allow you to use the Dragon without it. WinAVR, on Windows, and AVR-GCC are two free C compilers for the AVR processor.

clip_image004

Fig. 2 A screenshot from Atmel’s free IDE.

Final Thoughts

The AVR Dragon is a great piece of hardware and a great deal if handled with care. While it does require a bit of extra effort in terms of setup and use, that is the price you pay for the money you save (whether it is worth it is up to you). The versatility of the Dragon would make it at least a good backup programmer, or a device for reviving chips the HV programming. All in all, I have yet to rate the Dragon, but so far, it does not seem too sha
bby.

Link for more Dragon info

Posted in Development Tools, Discovering, Microcontroller.


2 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

  1. Jacob says

    Use at your own discretion:

    tinyurl.com/dragonhack

  2. Frank Zhao says

    Can you post the link to the 3rd party driver that bypasses the emulation limitation?