Program the Arduino Micro with Atmel Studio + AVRISP mkII

Introduction
Probably you have the same problem like me: Some days ago i have bought a tiny Arduino Micro board to play a little bit around with them. I installed the arduino IDE (currently 1.0.5) under Windows7 (64bit). Then i have tried to install the Windows USB driver which are delivered with the arduino IDE. Finally after a lot of attempts the driver were successful installed, but evertime after i’ve connected the PC with the Arduino board (by micro USB cable), the virtual Arduino COM port appeared for a short moment in the hardware manager and after few seconds the COM port disappeares and shows instead an ‚unknown device‘.

To save time and nerves, i decided to use the AVRISP mkII programmer – a device which is able to program AVR devices over the SPI interface. This device has also a lot of other features. In my opinion a small, powerful and not really expensive device.

So i tried to transfer a small test program with help of the AVRISP and the arduino IDE to my Arduino. But everytime i’ve got the error message „avrdude: usbdev_open() did not find any usb device usb“. Because i didn’t want to invest too much time into get the avrdude running i decided eventually to use the Atmel Studio with the AVRISP.

As following i will explain you how to deal with Atmel Studio and the AVRISP mkII ISP programmer to transfer programs to the Arduinos flash. By the way each Arduino board (with an ISP connector) should be programmable in this way. This is not restricted to the Arduino Micro.

Prerequesites

  • a installed Atmel Studio (current version: 6.1.x)
  • an AVRISP mkII programmer device
  • a micro USB cable (connected to a power source)

Workflow
1. Connect the micro USB cable with your Arduino board. Then connect your AVRISP with your PC and the board:
arduino_micro_musb_avrispmkii

2. Start the Atmel Studio software and open the menu „Tools“ -> „Device Programming“:
as_menu_devprog

3. Choose for Tool the „AVRISP mkII“, for the device „ATmega32U4 and for interface „ISP“ and press „Apply“:
as_devprog_apply

4. After configuration of the device we want to read the device information. Click on the „Device information“ bar on the left side and press the „Read“ button:
as_devprog_read

5. If the software could read your device information you are ready to program the Arduino! But before please read how to backup the Arduino bootloader.
as_devprog_read_done

Attention: Backup your Arduino Bootloader
If you want to program your Arduino with the Atmel Studio you will overwrite the Arduino bootloader. Therefore if you need the bootloader later, you can save them (before the first programming) or download them from the Arduino site.

To save the default bootloader open the menu „Tools“ and open again the entry „Device Programming“. Choose as described some sentences above your device, click on „Apply“ and then on „Memories“. Now you can use „Read:“ to write the Flash (or EEPROM) content of the ATmega into a file:

as_devprog_read_flash

Links

Have fun!

Advertisements

I'm an independent german IT consultant for Java, J2E and C++ - in my spare time I work on embedded devices, digital Image- and Signal processing, riding motorcycle, doing sports and do many other things.

Tagged with: , , , , ,
Veröffentlicht in Arduino

Kommentar verfassen

Trage deine Daten unten ein oder klicke ein Icon um dich einzuloggen:

WordPress.com-Logo

Du kommentierst mit Deinem WordPress.com-Konto. Abmelden / Ändern )

Twitter-Bild

Du kommentierst mit Deinem Twitter-Konto. Abmelden / Ändern )

Facebook-Foto

Du kommentierst mit Deinem Facebook-Konto. Abmelden / Ändern )

Google+ Foto

Du kommentierst mit Deinem Google+-Konto. Abmelden / Ändern )

Verbinde mit %s

%d Bloggern gefällt das: