01. Preparing atmega* Xplained mini for Arduino IDE use (MS Windows) - AtmelUniversityFrance/atmel-avr-xmini-boardmanagermodule Wiki

This article will cover how to prepare an Atmel AVR Xplained mini for its use with Arduino IDE v1.6.6 and higher.

At the moment (before avrdude 6.4 release), we need to use Atmel Studio to program the Optiboot bootloader into atmega.

Remark 1: This may be temporary and submitted to further changes.

Remark 2: Actions described below have been processed using Atmel Studio 7.0.1006 (latest version as of July, 29th, 2016)

Note: Atmel Studio can be found here: Atmel Studio download page

1. Programming the atmega fuses

We have to enable 3 fuses:

  1. Brownout detection at 4.3V

  2. Bootloader size of 256 words, ie 512 bytes

  3. atmega clock provided by external source (mEDBG from AVR Xplained minis)

Fuses\Product atmega328P atmega328PB atmega168PB
Low 0xE0 0xE0 0xE0
High 0xDE 0xDE 0xDC
Extended 0xFC 0xFC 0xFC

1.1. atmega328p fuses

Screenshot of atmega328p fuses

1.2. atmega328pb fuses

Screenshot of atmega328pb fuses

1.3. atmega168pb fuses

Screenshot of atmega168pb fuses

2. Program Optiboot using Atmel Studio

Under MS Windows, the Arduino IDE v1.6.x is installed in a path like

C:\Users\**<user>**\AppData\Local\Arduino15\packages\atmel-avr-xminis\hardware\avr\**<package version>**

(If you don't see this folder it might be because Windows hides it. Go to Control Panel, Folder Options, View, Advanced Settings and set the 'Show hidden files' bullet.)

Screenshot of Optiboot initial programming

Optiboot file can be one of the following:

4. End of process

You can now close Atmel Studio and start Arduino IDE v1.6.x.