AVR Dragon

I have been using an AVRISP mkII for programming my AVR microcontrollers since I started playing with them a year or so ago. I really like the AVRISP because it’s inexpensive, it works well and it’s small enough to carry around. I recently made a mistake on a little test chip that I was using and programmed the RSTDISBL fuse because I wanted to use the reset pin as a port. Well that made it impossible for my AVRISP to reprogram the chip. It seemed obvious¬†after¬†I did it. You see the chip needs to be held in reset for the in circuit serial programming to work. Since I disabled the reset pin it couldn’t do this anymore. Well I decided to bite the bullet and buy an AVR Dragon, since I kinda wanted one for its debugging capabilities anyway. Now I had an excuse, I needed the high voltage programming to fix my screw up.

This little programmer/debugger is pretty cool. It has the ability to program all the modes of most (if not all) of the AVR line of microcontrollers. It also talks to AVR Studio and can be used as an in circuit emulator. Actually it’s a little bit better than an emulator because it doesn’t emulate, it actually executes the code on the target microcontroller. It uses either the JTAG or DebugWire interface on the microcontroller to control the chip. It can do this on the prototype area on the Dragon board or in the target circuit.

I had a little bit of trouble with mine at first. I use a Mac and have Windows running in VMWare Fusion. This has usually worked really well for me but for some reason I was unable to update the firmware in the AVR Dragon. I had an old laptop at work with XP installed on it, so I put AVR Studio on that machine and used it to update the firmware. It works fine. I hope that Atmel gets that figured out before too long. Surely I’m not the only one having that problem. Once the firmware is updated, it works fine from VMWare but there was something about the firmware update.

The documentation for the Dragon is pretty good in some areas and not so good in others. It’s great for wiring but it took a little digging and Googling for me to figure out that the Dragon doesn’t really do any emulation. It simply uses the debugging interfaces on the target chip. This is actually a better deal than emulation since it runs on the actual hardware but it means that you do have to have the target chip to plug into the Dragon.

The software interface to AVR Studio is simple and easy. You just select AVR Dragon as the programming interface if you want to use it for programming. You can also select it as the debugging device instead of the simulator and use the emulation capabilities. The programming interface is pretty intuitive but it can be a little tedious. The Dragon doesn’t actually connect the debug/programming interface to the prototype area on the board. The High Voltage programming port, the ISP port and the JTAG port are all put on dual row headers (one you have to install yourself) and then there is another 40 pin header that corresponds to the pins on the microcontroller socket (that you also have to install yourself). I found that it was very helpful to have some little jumper wires with female header connectors on them so that it’ll be easy to wire up from one AVR to another.

AVR Studio has all the documentation for wiring in the AVR Tools Help menu. The wiring for each of the AVR line is laid our really well and in color which makes it quite easy to hook up.

I also found it helpful to install a 40 pin ZIF socket on the prototype area. This lets me put any AVR that the Dragon supports (well any that are PDIPs) in this socket very easily. Here is a picture of my Dragon with the jumper wires set up to do high voltage programming on an ATtiny84.

Oh the story on my little ATtiny that I disabled reset on ends well. I put it in the Dragon, unprogrammed the fuse, put it back in my target circuit and it works just fine. It’s short one I/O pin (that I didn’t really need anyway) but I can program it with my AVRISP mkII again.