[Lab] arduino programming methodology

Trevyn Watson trevyn at dybydx.ca
Sun Aug 7 14:40:47 EDT 2011

Yeah, debugging is one area where Arduino falls a bit short, which is 
unfortunate since it's aimed at people new to programming.

However, there is an option:

AVRs support a protocol called DebugWIRE, which uses the reset pin as a 
two-way communication port to get debugging info into and out of the 
chip. You need a piece of hardware to interface DebugWIRE to your 
computer. The cheapest at the moment is the AVR Dragon, available at 
Digikey: http://bit.ly/o5jlke. It supports a vast number of AVRs, and  a 
few useful programming modes in addition to DebugWIRE - HVPP (useful if 
you screwed up the fuses on a chip), JTAG, and ISP (for loading the 
Arduino bootloader or using your AVR without it).

The Dragon interfaces with AVR Studio and gives you direct control over 
the registers including IO, and the ability to single-step through your 
programs. I've used it, but never with an Arduino. I found a blog post 
that explains very thoroughly what it is and how to do it: 

On 07/08/2011 12|37, Darcy Whyte wrote:
> I worked on Baby Drawbot a bit this morning.
> I find that the method of streaming debug information into the serial
> monitor is pretty poor.
> Are there any methods of:
> 1) using an emulator so we can do tracing and have better problem solving?
> 2) a way of tapping into the processor to get real time information
> about what's going on (aside from those silly serial writes).
> _______________________________________________
> Lab mailing list
> Lab at artengine.ca
> http://artengine.ca/mailman/listinfo/lab

More information about the Lab mailing list