

I say “allegedly” since you seem to have to be hooked up via the ISP (in-circuit-programming) six-pin connector to make it work, but at least it doesn’t take out one of your I/O banks. DebugWIRE allegedly uses just one – the reset line. The chips used in the Arduino use Atmel’s fancy new proprietary method called “ DebugWIRE.” JTAG uses a ten-pin connector and uses I/O lines that your circuit might want during debugging. Problem: The chip on the Arduino Diecimila/Duemilanove (ATMega168 or ATMega328), doesn’t have JTAG.

A few years ago I went out and bought a JTAGICE clone so I could debug my stuff. With previous Atmel microcontrollers I’ve worked with they have an interface called JTAG. Sure, you can pepper your code with Serial.println() statements, but that only gets you so far if you’re staring at the board and asking “Just why aren’t you doing what I want?” Speaking from my background, I do some embedded system stuff, and the frustrating part of the Arduino is the lack of an “ICE” (In-Circuit-Emulation)/”OCD” (On-Chip-Debugging) workflow. You can also ditch the onboard bootloader for more space, if you feel like it.
#DEBUG THROUGH SPI ARDUINO FULL#
If the day comes you become frustrated with the limitations on Arduino code and want to go on and be a full on Atmel Assembler/GCC nerd, you can. What’s nice about the Arduino is the hardware isn’t particularly bound to the pseudo-Processing-C++ language. There’s also a significant community built up around the Arduino now, so you have lots of other people to compare with for help and ideas. If you’re new to microcontrollers but want to do stuff, the Arduino is a good choice for a start. You program in a language they say is based on Processing, but to the user just looks like C++ with a lot of busy-work done in libraries for you. Nice and cheap basic little boards that have a USB connection, and an onboard bootloader so you don’t need another piece of hardware to program it.

Little boards based on the Atmel 8-bit line of microcontrollers. If you do this and you wreck your Arduino, your AVR Dragon, your wife leaves you and the dog eats your shoes don’t complain to me. No warranty is expressed or implied in this.
#DEBUG THROUGH SPI ARDUINO HOW TO#
Today I’m going to give a little instruction in how to modify an Arduino board so you can actually do something useful with it – like debug it. This article talks about the Diecimila, but there is a newer article that talks about the Duemilanove
