I'm attempting to burn the Uno bootloader onto a target board that is built around the ATMega328 using a USBtinyISP from Adafruit, but have been having problems.
I receive the following error when I choose Tools > Burn bootloader in the Arduino IDE (version 1.0.3, using the "Uno" board type):
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.
I'm confident that I've checked all of the things covered by Adafruit's FAQ (here: USBtiny-based AVR Programmer FAQ), but am still getting the error.
I've attached the schematic for the board I'm working with, and a picture showing how I am connecting everything together.
I've used a multimeter to check that every pin that should be connected to 5V and GND is, and it all looks OK.
Earlier today I attempted to solder the components (and the 328) using the hot plate reflow method, but I got a bunch of bridging on the 328's pins so I removed it and hand-soldered it afterwards. It may be possible that it is literally fried, but I'm not sure how to make sure of that.
the Arduino IDE's "boards.txt" file needs several lines added to it:
##############################################################
usbtiny328.name=[usbtinyisp]ATmega328
usbtiny328.upload.using=usbtinyisp
usbtiny328.upload.maximum_size=32768
usbtiny328.build.mcu=atmega328p
usbtiny328.build.f_cpu=16000000L
usbtiny328.build.core=arduino
usbtiny328.build.variant=standard
Note: The …variant=standard line is only needed for Arduino 1.0+. Older versions of Arduino will just ignore it.
Maybe you thrashed the 328 afterall.
Do you have a Uno or other Arduino (a "DMN" or Nano) that you could try it with?
Then you could establish that the usbtinyisp is OK.
Regarding this board that you made, where you're trying to burn the bootloader in place, are the ICSP related pins (IC pins 1, 17, 18, 19; /R, D11, D12, D13) free or are they loaded?
Isn't this the message you get when the PC can't talk to the programmer?
Did you properly set the "programmer" to USBtinyISP in the arduino's "programmer" menu?
(Turn on verbose upload so you can see if there are any other interesting messages.)
(also, you can try running avrdude from the command-line, which will give you a bunch of additional options for "poking" at your setup.)
I was able to flash the Diecimila bootloader onto an old board with a 168 on it, and it worked perfectly first time.
In my original post I attached a schematic; please check pin PB3 (MOSI) on the ATMEGA328. I have it going to a logic-level MOSFET to control some external LEDs (not connected currently). Does this qualify as "loaded"?
I turned on verbose mode and tried to burn the bootloader again, here is the complete output in my console: