NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Microcontroller Programming » Debugger

March 03, 2011
by norby31
norby31's Avatar

I've been using my Mac to program the Atmel, but I finally decided to move to my PC because I thought there was a real-time debugger. Basically I want to step through my program. Was I mistaken that it exists?

March 03, 2011
by hevans
(NerdKits Staff)

hevans's Avatar

Hi norby31,

There are a few debuggers for the AVR, none of them are very easy to set up, and I have never found any of them extremely useful. AVRStudio does provide a simulator with a debugger which you could step through, but this does not allow you to step through the code on the MCU itself. JTAG debuggers are special pieces of software that do allow you to peak into what is going on in the device itself, but they are more expensive, and I'm not positive even they allow you actually step through the code.


March 03, 2011
by Ralphxyz
Ralphxyz's Avatar

Supposedly the ATmel Dragon (a JTAG programmer) for $49.00 will allow on chip debugging, in conjunction with AVR Studio.

I have a Dragon but never could figure out how to use JTAG with a ATmega168 or 328 though I did not look long or in detail.

Please let us know if you get something to work. I have "tried" the AVR Studio simulator debugging, but again just a quick run through to see if I could get it to work so I have no idea how well or easy it would be to work with (nor would I be qualified to pass judgement, I can do a works or doesn't work test but not much further).

I believe most just post messages to the LCD for their debugging work.

If you Google "AVR debugger" you will find a couple of them.

The Dragon programmer requires you to solder on the required header pins and to make up your own wiring harnesses. It does not have a case so it is a bare PCB (all of the components are exposed) which had issues with people touching and shorting out when it was powered. Supposedly the shorting issue has been resolved with the latest release. I use it for everyday flash loading of my programs without using the bootloader. For that it works great and it was fun to learn how to solder on the headers and to makeup the wiring harness(s). It too I have to spend the time to learn how to use in depth.

A supposedly advantage to using a ATmel programmer like the Dragon is the online update so any future ATmel device should be supported. A programmer from Ebay might not be upgradeable or in fact might not even support current devices.


Post a Reply

Please log in to post a reply.

Did you know that NerdKits has a TV commercial, seen on MythBusters and the Science Channel? Learn more...