Pages: [1] 2   Go Down
Author Topic: AVRISP MKII AVRDUDE Can't find USB  (Read 8748 times)
0 Members and 1 Guest are viewing this topic.
Kingsport, TN
Offline Offline
Newbie
*
Karma: 0
Posts: 49
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:

C:\Windows\system32\drivers\libusb0.sys
"                                       "\libusb0.dll
C:\Windows\system64\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!
Logged

SE USA
Offline Offline
Faraday Member
**
Karma: 41
Posts: 3783
@ssh0le
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

do you have a bootloader on it?
Logged


Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 518
Posts: 26322
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Kingsport, TN
Offline Offline
Newbie
*
Karma: 0
Posts: 49
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Kingsport, TN
Offline Offline
Newbie
*
Karma: 0
Posts: 49
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

Logged

Kingsport, TN
Offline Offline
Newbie
*
Karma: 0
Posts: 49
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Kingsport, TN
Offline Offline
Newbie
*
Karma: 0
Posts: 49
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

Kingsport, TN
Offline Offline
Newbie
*
Karma: 0
Posts: 49
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Kingsport, TN
Offline Offline
Newbie
*
Karma: 0
Posts: 49
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

0
Offline Offline
Faraday Member
**
Karma: 23
Posts: 3470
20 LEDs are enough
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Check out my experiments http://blog.blinkenlight.net

Kingsport, TN
Offline Offline
Newbie
*
Karma: 0
Posts: 49
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

0
Offline Offline
Faraday Member
**
Karma: 23
Posts: 3470
20 LEDs are enough
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&p=468532
Logged

Check out my experiments http://blog.blinkenlight.net

Kingsport, TN
Offline Offline
Newbie
*
Karma: 0
Posts: 49
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

0
Offline Offline
Faraday Member
**
Karma: 23
Posts: 3470
20 LEDs are enough
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: September 17, 2012, 11:49:33 am by Udo Klein » Logged

Check out my experiments http://blog.blinkenlight.net

Kingsport, TN
Offline Offline
Newbie
*
Karma: 0
Posts: 49
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Pages: [1] 2   Go Up
Jump to: