C Programming with Arduino
Programmer An AVRISP mkII programmer (part number ATAVRISP2) or AVR Dragon programmer / debugger (part number ATAVRDRAGON) is required for loading programs to the Arduino board. Both of these programmers are Atmel devices and are fully compatible with Atmel Studio. I would recommend getting the AVR Dragon as it has debugging capabilities as well as the ability to do HV programming that can be used to unbrick a DIP packaged AVR microcontroller. The AVRISP mkII can only program AVR microcontrollers and has no debugging capabilities. The AVR Dragon does not come with any cables, you will need a standard USB cable as well as a 6-way ribbon cable with female 6-way (2 by 3) headers on each end. There are other AVR programmers on the market made by various manufacturers that may be cheaper than the programmers from Atmel, but these programmers will need external software in order to use them. They will also require extra set-up steps in order to use them in Atmel Studio and will most likely not have any debugging abilities.
Atmel AVR Dragon Programmer / Debugger and Arduino Uno
Technical Terms Debugging – Debugging refers to finding and fixing program errors. An embedded programmer or software engineer will write a program and then test it to see if it works as intended. If there is a problem with the program, e.g. “Why does the LED not switch on when it is supposed to?”, the embedded programmer will debug the program. AVR microcontrollers on the Arduino boards used in this book can be debugged using the AVR Dragon attached to the ICSP header on the board. When a software program called a debugger is run on the PC from within Atmel Studio, it accesses the embedded system through the ICSP header via the AVR Dragon and enables the programmer to step through the program and examine the contents of the microcontroller’s memory. This helps the programmer to find the bug (program error) and fix it.
● 22