Help: an Absolute Beginner's Guide to 8-Bit AVR Programming-AVR Dragon




If you'd like to test the waters of microcontroller programming, the new AVR Dragon by Atmel Corporation is a nifty, low-cost entry-level development tool. Unfortunately, right out of the box, the AVR Dragon is not the definitive answer for the beginner looking for an all-in-one solution. Rather, the AVR Dragon is a great microcontroller programmer foundation, but it is seriously lacking in enabling the beginner to hit the ground running.

What is an AVR?

An AVR is a relatively inexpensive user-programmable microprocessor that can be integrated into just about any project that needs a brain. Unlike most computer/electronics terms, decoding the AVR acronym is tricky. While some Atmel AVR devotees will claim that it doesn't have a definition others will state with a straight face that it isn't even an acronym. Some microcontroller programmers think that AVR is derived from the initials of the engineers who designed the AVR--Alf & Vegard + RISC. After extensive research, however, the most believable definition could be: AVR = Advanced Virtual RISC.

Enter the AVR Dragon

Whether it's a marketing lapse or a brilliant design configuration feature, beginners should be aware that Atmel Corporation does not include several vital pieces of equipment in the AVR Dragon box.

Yes, the AVR Dragon is USB-powered and yes, there is a free programming application that can be used with the AVR Dragon; but, you will need to provide your own USB cable and you will have to download the latest version of AVR Studio from the Atmel Web site.

Furthermore, you will be required to solder several components to the AVR Dragon to enable it to work with the widest variety of 8-bit AVR products. These components enable the budding AVR user to program and emulate many of the products in the AVR device family. A properly configured AVR Dragon offers these programming interfaces:

  • In-System Programming
  • High Voltage Serial Programming
  • Parallel Programming
  • JTAG Programming

As well as these emulation interfaces:

  • JTAG
  • debugWIRE

Still the nagging question for the beginner is what components do I need for making the AVR Dragon easy to use?

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: How to Prepare the AVR Dragon for AVR Programming

2 hours
Cost: $56.67

Parts List

  • AVR Dragon (Digi-Key; ATAVRDRAGON-ND $49)
  • (1) AMP 6-Position, 2-Row, .100 Connector Housing (Digi-Key; A3032-ND $1.30)
  • (32) AMP 1-Position, .100 Connector Housing (Digi-Key; A26962-ND $11.12)
  • (38) AMP 15 Au, Crimp 27-32 AWG, Connector Socket (Digi-Key; A25955-ND $25.02)
  • (1) IDC Multi-Color 20-Position Ribbon Cable with 20-Position, 2-Row Socket (Digi-Key; M1AXA-2036R-ND $4.39)
  • (1) AMP 20-Position, 2-Row .100 Straight Breakaway Header Connector (Digi-Key; A26525-10-ND $1.21)
  • (1) AMP 40-Position, 2-Row, .100 Straight Breakaway Header Connector (Digi-Key; A26525-20-ND $1.61)
  • (1) ARES 40-Pin ZIF Socket (Digi-Key; A306-ND $12.02)

Step 2: It's in There, Somewhere

Atmel does include a brief mention about configuring the AVR Dragon inside its online help with AVR Studio 4. Unfortunately, they don't offer any help for determining the best components for obtaining this flexible configuration capability.

In order to review Atmel's AVR Dragon hardware configuration information, select AVR Tools User Guide under the Help menu. Inside the chapter AVR Dragon Prototype Area and under the section Using the Onboard Prototype Area near the bottom of this section there is a brief mention of adding a 20-pin header, a 40-pin header, and a 40-pin zero insertion force socket (ZIF) for making the AVR Dragon "even more flexible."

Step 3: Headers and ZIF and Solder, Oh My

From a beginner's perspective, the thought of having to "scratch build" your commercial programmer might seem a little daunting. Actually, the hardest part of this DIY venture is complete--once you purchase the headers and ZIF. The actual soldering is tedious, but straightforward.

Step 4: Follow the Device Connection Sheet

All of the connection information for setting up the programming and emulation interfaces for a specific AVR device is listed on a Device Connection Sheet. A handful of these sheets are available in the online AVR Tools User Guide. Consult the appropriate microcontroller's Device Connection Sheet for determining how many jumpers you will need to fabricate.

Step 5: Long and Winding Ribbon Cable

Making the various header connections depicted on an AVR Device Connection Sheet is best accomplished with a fistful of jumper wires. A 20-position socket with ribbon cable can reduce the drudgery of soldering 1-position socket receptacles to both ends of 20 jumpers. Using ribbon cable is optional. If you elect to use ribbon cable, cut the cable to a length of approximately 7 inches.

Regardless of your choice, you will need to make one jumper for each header/ZIF connection that is cited on the applicable AVR Device Connection Sheet.

Step 6: If I Only Had a Brain

Drop your target AVR DIP into the ZIF, connect the USB cable to the AVR Dragon, fire up AVR Studio 4, and you are ready to burn your first microcontroller. Consider yourself armed and very dangerous. Now no LED is safe.

Step 7: The Land of Ahs

Welcome to the world of microcontroller project design. If you are convinced that AVR microcontroller programming is the method to your madness, then here are some links for making you the master of your new domain:

Be the First to Share


    • CNC Contest

      CNC Contest
    • Make it Move

      Make it Move
    • Teacher Contest

      Teacher Contest

    43 Discussions


    4 years ago on Introduction


    I got atmel ICE basic, 6pin wire and atmega1248. how i should connect the pins, because it not send the program. I tried to look datasheet but it now work.


    5 years ago on Step 6

    And all of that is fine until you take your 1284 chip, plug it in and absolutely nothing happens because it uses an external crystal - and there is no clock feed. Simple answer though it took me ages to figure it out, feeling as I did that my dragon was bust - is simply to drop a crystal into the relevant socket pins!


    5 years ago on Introduction

    I have a question, I am using a xmega32A4, and i know that the A4 subfamily is compatible with the dragon. The issue is this MCU has 44 pins and is embedded. Any suggestions as to how to overcome this issue?


    8 years ago on Introduction

    I think I am stupid...
    but on my avr dragon the "B" and "G" are both VCC the whole column 2,4,6 is vcc and 1,3,6 is gnd. did I miss something why you short that to the ground pin of the MCU?
    Please help me out there!


    8 years ago on Introduction

    There's actually no need to build that cable. All you have to do is by some jumper wires like these: (Jumper Wires Premium 6" F/F Pack of 10). Just use as many as you need, as according to the AVR Dragon manual. I think it's ridiculous to make that $50 cable that involves crimping and stuff. Just get the Dragon and headers from Digikey and two packs of those jumper wires from Sparkfun, and you'll be set.


    8 years ago on Introduction

    um looking for elevator avr program. Do you have example program ?


    9 years ago on Step 1

    Only $16? Thats a lot for something that originally costs just a couple of dollars.


    9 years ago on Step 1

     I want a complete programmer, how much u wil cost it exactly


    10 years ago on Step 5

    Hi popsci thanks for the help making sense of what needed doing! For what it's worth, I did mine with pcb-mount sockets instead of flying leads; see pictures. (NB: these are for Atmega168, which has a slightly different pinout, but intended to show the principle.)

    2 replies

    Reply 9 years ago on Step 5

    I also like the perf board. I made mine with 2 40 position receptacles and the small one. The digikey part is A32967-ND for the ones I bought.


    Reply 11 years ago on Step 1

    only if you like bending and eventually breaking off the pins of a 40$ chip

    The Ideanatorosgeld

    Reply 10 years ago on Introduction

    If you go on Atmel's site and poke around, you can find their sample button and get em for free, I haven't tried it though, since I'm totally new to the programming scene, so you might have to pay for shipping. Oh, and FTR, Radio Shack, Digi-key & Mouser are overpriced

    vonniedaThe Ideanator

    Reply 10 years ago on Step 1

    Any recommendations on who isn't overpriced? I've always found Digikey to be really reasonable.

    The Ideanatorvonnieda

    Reply 10 years ago on Step 1

    Oh, NVM, I didn't mean digi-key & mouser, i meant allied elec. I was commenting to osgeld that people can get free samples on some stuff, just don't sample too much and screw it up for everyone else


    Reply 11 years ago on Introduction

    I don't know what chips you're talking about, but the attiny2313, as demoed here, only runs about two bucks a pop.

    the pro

    11 years ago on Introduction

    is there any robot that you can make out of old electronics?