OK I've got a few naked 328P's on the way that I want to use to get some of my UNOs back from other projects.
I want to use an UNO as an ISP to program them. I've read a bunch of webpages and tutorials and threads and I'm still confused. I think I understand how to burn the bootloader, but I'm not sure exactly which file is the right one to load onto the programming arduino if I want to do that from the IDE with arduino as ISP selected as the programmer.
And once I have the bootloader on there, how do I then upload the sketch? If I'm uploading the sketch via an arduino as ISP, do I really need to burn a bootloader on it? How would I go about changing fuse settings if I wanted to let one of these run off the internal 8MHz oscillator? I understand from the data sheet which fuses to set, but how do I actually make that happen?
The way I like doing it is burning the normal bootloader of your choice using the IDE, this way all the necessary fuses (default ones), will be set on the new chip so it can work as expected within Arduino. After that I use avrdude in command line to set individual fuses I want to change, like the internal 8MHz clock and so on.
If you are going to use Arduino as programmer too often I recommend getting a real programmer. Maybe it’s something im doing wrong but i find Arduino as programmer not much reliable. A great option is using USBASP, Arduino has support for it now and you can assemble it on a perfboard e.g., using few parts. At least USBASP never failed on me. http://www.fischl.de/usbasp/
Not really something you asked but what’s very useful to me also dealing with spare atmega’s is the TTL<->Serial interface. You plug that into some serial port (or use these USB-Serial adaptor cables), to upload sketches using serial. You can buy these or just have it on perfboard also. One I used without trouble http://www.uchobby.com/index.php/2007/06/11/ttl-to-rs232-adaptor-explained/
With a programmer you dont need the bootloader to upload sketches to the chip, just use the programmer. You will need the bottloader to be able to upload sketches using the serial port though.