Go Down

Topic: AVRISP MKII AVRDUDE Can't find USB (Read 18380 times) previous topic - next topic


I know this topic has been covered before, but I have not been able to find a solution to my particular situation. I am using an AVR ISP MKII programmer with a custom board. The board is essentially just a pro mini 3.3V with a few other components added to it. when I hook the board up I get a green light on my programmer, but when I try to program the board, I get the following error.

avrdude: usbdev_open(): did not find any USB device "usb"

I manually installed what I thought was the correct driver for the ISP.

When I look at the driver details it tells me the following list of driver files:

"                                       "\libusb0.dll

That's all the relevant info I can think of at the moment. I'm at a loss. Oh, I should also add that at the bottom of the IDE window it says the following:
Arduino Pro or Pro Mini (3.3V, 8MHz) w/ Atmega168 on COM4.

I was happy when I saw that thinking it meant it recognized it...but still the same error. Thanks!




Did you provide power to the board?
The MKii will not power the board, it only monitors what is present and adjust its levels accordingly.

When you connect the Mkii to the PC without connecting it to the board, does it show up in
Device Manager: Lib-USB Win32 Devices: AVRISP MKii
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.


No it is not bootloaded. It's a new board.

Yes I have supplied power to the board. Yes it shows up in device manager when hooked up without the board. (with a yellow flag cause it says the driver is unsigned)

I have downloaded AVR Studio. I have heard you can compile a sketch in arduino IDE and then upload it using AVR Studio. Can anyone give me a little more direction on that? I was gonna try it to see if it's just a disagreement between arduino IDE and the MKII.


Ok, so I found this: http://usethearduino.blogspot.com/2009/07/avrisp-mkii-frustration-and-workaround.html
Here's the summary.

"This is the workaround I've found:
Attemping to upload your code to the Arduino board does not work, but it does generate the .hex file for your code! The .hex file is saved in the "applet" folder in your sketch folder (the Arduino IDE creates an applet folder the first time you attempt to upload your sketch; each sketch has its own applet folder).
1. Work on your code in the Arduino interface.
2. When you are ready to upload, attempt an upload. This generates the .hex file. (You don't need to connect the Arduino board to attempt the upload).
3. From AVR Studio, program the Atmega168 (using the connections described above). On the "program" tab, in the "Flash" box, browse to the .hex file you just created. (You only need to do this once. The program tab points at the .hex file, so each time you update the .hex file in the previous step, just click the "Start" button in the Auto tab, or the "Program" button in the Program tab to program the device.)"

I will hopefully try this tonight and see what happens.


Also for reference: http://www.engblaze.com/tutorial-using-avr-studio-5-with-arduino-projects/

Looks like a pretty thorough explaination, though I'm not clear whether it allows using arduino libraries or not.


So I tried. I retrieved the .hex file from the hidden directory. But that's about as far as I had success. I have never used studio before (studio 6) and was not able to figure out how to flash it to the chip. Non of the instructions I saw seemed applicable. Studio seems to recognize and agree with the MKII, at least as far as I can tell. I tried the "program device" option, and it wanted a bunch of inputs. (baud rate, fuse settings, etc.) Which I didn't know what to tell it, so I left them in their default settings. But even from there I couldn't figure out how to upload the file. I may try downloading Studio 4 since it seems that's what all the instructions are for.

Any advice on how to use studio would be much appreciated. last night was the first time I touched it and I am currently completely lost. Too many buttons!


I downloaded studio 4. I think I'm making progress. I managed to get it to recognize the devise. when i try to program the devise however, i get the following output.

Getting isp parameter.. SD=0x06 .. OKOK
Reading FLASH input file.. OK
Setting mode and device parameters.. OK!
Entering programming mode.. OK!
Erasing device.. OK!
Programming FLASH ..      OK!
Reading FLASH ..      OK!
FLASH contents is equal to file.. OK
Leaving programming mode.. OK!

It obviously burns something to the chip cause the backlight on my display turns on. however nothing else works as it should.

My .hex file is named: HPA.cpp.hex. Does that sound right?  I am using the doglcd library on this, but i don"t believe that should matter once it's compiled. Is there a way to directly load the c++ file that IDE generates?


I suppose it could be a problem that I'm using a 168A instead of a 168?


The IDE can use the mkii directly for flashing your hex files. However the procedure depends on the specific version of Arduino IDE you are using. Which one do you have installed?
Check out my experiments http://blog.blinkenlight.net


So i tried that. i have ide 1.0 installed. however i get the following error message when i try to upload the sketch with the programmer.

avrdude: Version 5.11, compiled on Sep  2 2011 at 19:38:36
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "C:\Users\Suzanne\Desktop\arduino-1.0\hardware/tools/avr/etc/avrdude.conf"

         Using Port                    : usb
         Using Programmer              : stk500v2
avrdude: usbdev_open(): did not find any USB device "usb"

I'm not sure about the whole "using port: usb" that doesn"t seem like a correct port name to me.


OK, so if I understood it right it works with AVRStudio at least to the point that you can connect to the controller. But it does not work with Arduino 1.0 / AVRDude because it does not find the programmer. This is most likely a driver issues. However since I am working with Linux I can not verify any hints on this.

This may or may not be a solution.
Check out my experiments http://blog.blinkenlight.net


Well, my daughter spilled water on my computer and now it's dead. *sigh* I can't look at my program at this point til I recover my hard drive. however I checked the voltage on some of my pins and it would seem that some pins are pulled up which should not be. Is there any chance switching between IDE and Sudio the pin definitions get mixed up? I know it's more likely that I made a mistake in my program, but it was running correctly on a prototype board which was supposed to be identical to my final design. I'll check my program as soon as I can access it.

Also, just to make sure, all the standard pin numbering in IDE still work when I'm programming without the bootloader, correct? Again, I realize it's more likely my mistake...I just want to look at all the possibilities.


Sep 17, 2012, 06:37 pm Last Edit: Sep 17, 2012, 06:49 pm by Udo Klein Reason: 1
No, switching Arduino IDE and Studio may make it impossible to compile. However it has no impact on the binaries. That is: if you compile with IDE and upload with studio the result will be the same. The same holds true for the bootloader. There is a theoretic possibility to detect the presence of a bootloader and thus to get intentionally different results. However it is very unlikely to trigger this unintentionally.
Check out my experiments http://blog.blinkenlight.net


Well crap, I checked and I'm definitely on the same pin from my prototype to the final... I hope I didn't make a mistake on my board layout and connect that pin to 3.3V. Something else to check I suppose.

Go Up