Bootloader on virgin Atmel 328p?

Is it possible to burn the Arduino bootloader onto a virgin Atmel 328p microcontroller? I see Mouser has one here:

and I'm wondering what do I need to do in the Arduino IDE (or do I need to use WinAVR) to upload a bootloader (which bootloader should I use)? Any links to schematics, parts, programmers (or how to do an ISP), would be appreciated. Thank you for your time.

Best Regards,

DataCrypt

The easiest way I know is to wire up an Arduino and a new blank chip like the bottom right circuit:

Then run this program on the Arduino:

Good luck!

Thanks guys. I was reading a little bit more on this last night and I'm glad it's a fairly straight forward process. Getting the Atmel with the bootloader already present is only a couple dollars higher than a virgin processor, but I like the fact that we can do it ourselves.

One other question though - can we use just about any Atmel with an Arduino bootloader or does it only work on specific Atmel microcontrollers?

Best Regards,

DataCrypt

You can use the Arduino as an ISP. Just use version 0.22 or 0.23 to load the sketch as they made a change to a buffer in 1.0 that causes a problem.

If you hook up the 328P with a crystal/resonator and proper power connections it is rather painless. You will probably need to put a 120 ohm resistor between +5 and reset on your arduino and then in the ArduinoIDE under Tools/Programmer select Arduino as ISP. then select Tools/Burn Bootloader. if you have a 328P it should load the bootloader and work just fine.

You could also burn the bootloader from a DOS prompt, just takes a little more typing. If you were to buy a 328 it is easy to burn the bootloader from a DOS prompt and then it works just fine in the Arduino board.

can we use just about any Atmel with an Arduino bootloader or does it only work on specific Atmel microcontrollers?

It only works on specific Atmel microcontrollers. And you have to have a version of the bootloader compiled for that specific bootloader. There are several .hex files distributed with Arduino, and several more than you can build from the source. (And there are several different bootloaders in use, each of which supports a slightly different mix of chips.)

We think the problem with Arduino 1.0 and ArduinoISP has been identified, and a patch is pending. Google Code Archive - Long-term storage for Google Code Project Hosting.

This details my first attempt XD XD