Skip to content

Instantly share code, notes, and snippets.

@blakerohde
Last active December 22, 2015 16:59
Show Gist options
  • Save blakerohde/6502907 to your computer and use it in GitHub Desktop.
Save blakerohde/6502907 to your computer and use it in GitHub Desktop.
Notes for using the AVRDragon with an Arduino Duemilanove and/or other compatible AVR chips.

Using AVRDragon

Hardware Setup

  1. For Arduino Duemilanove:Make sure RESET-EN jumper is broken.
  2. Power on AVRDragon via USB.
  3. Connect ISCP cable with ribbon end pointing towards USB ports of Arduino and AVRDragon.
  4. Power on Arduino via external power source.

Programming w/o DebugWire

  1. Ensure the ATMEGA chip does not have the DebugWire Fuse enabled.
    1. You can verify this by clicking View > Available Atmel Tools.
    2. Right click "AVR Dragon".
    3. Click Device Programming.
    4. Select the tool, device and ISP as the interface.
    5. Click Apply.
    6. Click Fuses.
    7. If you get an error then AVRDragon was unable to read the fuses as the chip currently has the DebugWire fuse enabled (or possibly another fuse that conflicts such as HighVoltage Programming).
  2. Inside AtmelStudio click Project > PROJECT Properties > Tool.
  3. Ensure AVRDragon is selected and "ISP" is selected for Interface option.
  4. Click Debug > Start Without Debugging and the code will be uploaded.

Programming and Debugging w/ DebugWire

  1. Ensure the ATMEGA chip has the DebugWire Fuse enabled. To check, see steps 1.1 through 1.7 in the above section.
  2. Inside AtmelStudio click Project > PROJECT Properties > Tool.
  3. Ensure AVRDragon is selected and "DebugWire" is selected for Interface option.
  4. Click Debug > Start Debugging and the code will be uploaded.
  5. After about 10 seconds or so, push the RESET button on the Arduino.
  6. Wait a short while longer and the debug session should be fully active.

Disable DebugWire

  1. Start a debug session per the above DebugWire section.
  2. Inside AtmelStudio click Debug > Disable debugWIRE and Close.
  3. Click OK on the warning/info popup message stating debugWIRE is only TEMPORARILY disabled.
  4. Click View > Available Atmel Tools.
  5. Right click "AVR Dragon".
  6. Click Device Programming.
  7. Select the tool, device and ISP as the interface.
  8. Click Apply.
  9. Click Fuses.
  10. Uncheck the DWEN fuse.
  11. Click Program.

Enable DebugWire

  1. Inside AtmelStudio click Project > PROJECT Properties > Tool.
  2. Ensure AVRDragon is selected and "ISP" is selected for Interface option.
  3. Click View > Available Atmel Tools.
  4. Right click "AVR Dragon".
  5. Click Device Programming.
  6. Select the tool, device and ISP as the interface.
  7. Click Apply.
  8. Click Fuses.
  9. Check the DWEN fuse.
  10. Click Program.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment