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.