Can't load bootloader...Help!

Hi guys - I'm new to this microcontroller thing. I have an Arduino Uno, but it seems that I damaged the chip during use. So, I ordered a couple new chips (Atmega328P) and bought the AVRISP programmer. Installed AVR Studio 4. Looks like I can read and write to/from the chip just fine. I selected \arduino\bootloaders\atmega8\atmegaboot.hex...loaded just fine. Hit "verify"...all good.

BUT, when I go to the arduino environment, I can't upload sketches to the board. Pressed the reset button, hoping to see the pin13 LED blink...no luck (indicating no bootloader). When I try burning a bootloader from the arduino environment (AVRISP mkII), I get "avrdude: usbdev_open(): did not find any USB device "usb"

I'm lost...can anyone help me out? Really appreciate it....

Arduino Uno: bootloaders\optiboot\optiboot_atmega328.hex

Thanks for the suggestion. I've tried that one and all of the others in the bootloader folder. I can tell that AVR Studio can "see" the chip and that it is being written to. I can read from what I've loaded from the chip as well (green lights flash for a few seconds each time I read or write to the chip).

Here's something else strange...with my original 328 (in an Uno board), AVR Studio can't read the bootloader from it. I get an error message. But the board works just fine! So, something really weird is going on.

Any other thoughts?

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1228502992 check this out for burning from the arduino ide :P it should work also with avr studio but you need to burn the fuses also check your boards.txt for the correct fuses

Thanks for the reply.

When I hook up my AVRISP mkII, I can burn the bootloader hex file just fine. BUT, the fuses are another story. I've looked up the fuse settings in the txt file in my Arduino sub-folder. For the ATmega328P, they should be:

Lowfuse = FF Highfuse = DE Ext Fuse = 05

However, after selecting Atmega328p in the drop down menu in AVR Studio 4, the fuse setings are listed as:

Lowfuse = FD Highfuse = DE Ext Fuse = FF

I can't seem to change these to the settings shown in the txt file. When I try changing the fuse settings to what is shown in the txt file, and then try uploading them to the chip, I get an error essentially telling me that the new values were not written.

Any idea on how to upload new fuse values???

OK…problem solved. The bootloader hex file that came with the Arduino download had a freakin’ bug in it. I had to go to the following link and download the fixed version:

https://raw.github.com/arduino/Arduino/master/hardware/arduino/bootloaders/optiboot/optiboot_atmega328.hex

Then I was able to burn bootloaders to the chip!!

Thanks for all your help!

The bootloader hex file that came with the Arduino download had a freakin' bug in it.

Which Arduino download (0022?) and which bug? Fuse values aren't normally stored in the .hex file, and I wouldn't think that the .hex file contents would interfere with changing fuse values.

There are comments in the optiboot makefiles to the effect that the fuse values you need to give to avrdude aren't exactly what you'd expect, because fuse bits default to 1's, but avrdude wants unimplemented fuse bits to be specified as zero. Or something like that.