Pages: [1]   Go Down
Author Topic: Can't bootload with AVRISP MKII and breadboard Arduino  (Read 1545 times)
0 Members and 1 Guest are viewing this topic.
Massachusetts
Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Help! I'm a reluctant convert to microprocessors. I bought a bunch of ATMega 328s and would like to bootload them Arduino. I followed the instructions to "Building an Arduino on a Breadboard" slavishly, including setting up an AVRISP MkII to program the chips.  When I try to bootload, I get the following message:
Error while burning bootloader.
avrdude: usbdev_open(1): did not find any USB device "usb"

I tried to run the ISP on an antique running Windows XP and my relatively new HP with Windows 7. Both gave the same message. What am I doing wrong?
Logged

"The old Europe"
Offline Offline
Edison Member
*
Karma: 1
Posts: 2005
Bootloaders suck!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Doesn't the atmel programmer require some kind of driver?
Logged

• Upload doesn't work? Do a loop-back test.
• There's absolutely NO excuse for not having an ISP!
• Your AVR needs a brain surgery? Use the online FUSE calculator.
My projects: RGB LED matrix, RGB LED ring, various ATtiny gadgets...
• Microsoft is not the answer. It is the question, and the answer is NO!

Massachusetts
Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I've checked and rechecked. I even reinstalled (repaired) AVR Studio.I seem to have the proper driver but it still gives the same message.
Logged

Massachusetts
Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well, I've spent the whole day (today) on research and discovered that the driver for the AVRISP mkII isn't compatible with avrdude - so why "building an arduino on a breadboard" tells you to use this combination, I do not know. Maybe the article will be updated to reflect reality..... I've uninstalled the studio that came with the atmel programmer and am trying to figure out how to install the libusb, which is supposed to work with avrdude. I'm done for the day. If I ever figure out how to use the mkII, I'll post.
Logged

"The old Europe"
Offline Offline
Edison Member
*
Karma: 1
Posts: 2005
Bootloaders suck!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

libusb... that rings a bell. I think it should be in the WinAVR directory somewhere. At least that was the case before AVRStudio 5.

Anyhow, if you get it working, please update the playground page that gave you grief.
Logged

• Upload doesn't work? Do a loop-back test.
• There's absolutely NO excuse for not having an ISP!
• Your AVR needs a brain surgery? Use the online FUSE calculator.
My projects: RGB LED matrix, RGB LED ring, various ATtiny gadgets...
• Microsoft is not the answer. It is the question, and the answer is NO!

Massachusetts
Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

After getting away from the problem for a day, the answer was right in front of me. Libusb won't work on Windows 7. Windows 7 is so paranoid, it won't use it because it isn't digitally signed. I'm not a programmer but I think I know what to do - use the antique computer, not my spiffy new laptop. I won't have to time play with it until next week but when I do, I'll post painfully detailed instructions so no one else will have to reinvent this particular wheel.
Logged

Massachusetts
Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Directions for bootloading Arduino onto ATMega chips using an AVRISP mkII.

First, get some ATMega chips, preferably 328P.

Second, download the latest version of Arduino. I used 0022. Someone told me that part of this download includes the driver that you will need, but I could not find it. I downloaded it from sourceforge.net, in their suite called WINAVR. Don’t forget to unpack it into its own folder. Also, remember to unpack Arduino into its own folder. Remember where your folders are.  Why not call the sourceforge location “WINAVR”, and the Arduino location “Arduino”? This will make life easier.

Third – realize that you cannot use Windows 7 (unless you are a Windows 7 programmer who can make things work, which I am not). I used a computer loaded with Windows XP. If you have Vista, I am so sorry. I know that all of this works on XP (although XP doesn’t like the unsigned driver and you have to tell it to use it anyway). If you are a wizard Windows 7 programmer, please post whatever it is that you had to do, in excruciating detail, for the rest of us to follow.

General information - I obtained the Atmel AVRISP MKII from Digikey; it cost about $45, including taxes and shipping (part number ATAVRISP2-ND).
Since I do not have a real Arduino, I followed the directions on the Arduino Playground for “Building an Arduino on a Breadboard.” I purchased the two Sparkfun boards, the FT232 breakout board (BOB-0071) and the AVR programming adapter ( BOB-08508), to make a REAL Arduino on a breadboard, including all ports. You won’t need the FT232 breakout board to bootload but I wanted it.  If you have a real Arduino, just use it and don’t waste your time building another on a breadboard.

Fourth – DO NOT USE THE SOFTWARE INCLUDED WITH THE ATMEL PROGRAMMER! You can only have one driver installed on a computer at a time and you need the one from sourceforge.net to use the Arduino programmer. However, if you are planning to do any other microprocessor programming, or you know how to install Arduino from the Atmel programming suite,  do it (and tell the rest of us every step). Even if you use the Arduino programmer, you might want to put the software somewhere, just remember to disable whichever driver you aren’t using at the moment.

Fifth – plug the programmer into the USB port on your computer. It should tell you that you have new hardware. Tell it that you have the software on a disk. You may have to fool around (like I did) to locate the driver for the hardware wizard, but it is located in WINAVR/utils/libusb/bin. You want the driver labeled avrisp2. Locate it and click it. If asked, tell the computer to install it despite its not being digitally signed.

Ok – you’re essentially done.  If you haven’t already, plug your Arduino or breadboard Arduino into the programmer, with a new Atmel ATMega 328P chip installed in it. Make sure you have a power supply for the Arduino as it will not get power from the programmer. I don’t know if this will actually work although it should in theory - but you might be able to power the Arduino through its USB port. I used a nine volt battery, though, to feed the voltage regulator. The programmer should still be plugged into a USB port on your computer. Fire up the Arduino program, located in the Arduino folder. First, chose a board in the "Tools" menu – I picked the Duemilanove 328 board from the menu. Now, go to “Tools” and pick “Burn bootloader.” Chose the AVRISP mkII programmer. It should burn Arduino in less than a minute. If you have an LED on pin 19, as described in “Building an Arduino on a Breadboard,” it will rapidly flash as the program is bootloaded, so rapidly that it may look like it is merely “on.” When the program is finished, it will shut off, then slowly flash every few seconds (very briefly). This will tell you that the bootload was successful (in addition to the comment line). Shut off the power supply (I unplugged the battery), then remove the chip and plug in the next fresh ATMega chip. You may need to lightly press all of the pins on one side of the chip against the tabletop to make it easier to plug the chip into the socket or breadboard. Make sure it’s oriented correctly. Plug in the battery and click “burn bootloader” again. You don’t need to reset the board choice. Repeat until all chips are bootloaded.

That’s it. I just bootloaded 25 chips in less than 30 minutes. Now, I’ve got enough Arduino chips to keep me busy for weeks.
Logged

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

Alternate approach: dump Windows and go for Linux --> reasonable driver is already included in the Kernel smiley
Logged

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

Pages: [1]   Go Up
Jump to: