Understanding stand alone ATmega328P

Can I buy a ATmega328P chip from anywhere like from Mouser and put it onto a Arduino UNO R3 board and program it from the Arduino IDE or does the ATmega328P already have to have some programming in it to be programmed? Or is there a specific model I have to get?

Also Mouser lists a ATMEGA328P-PU not the ATMEGA328P What does the -PU mean?

Thank you

If you buy a 328 chip from Mouser it will very likely not have a bootloader installed. You won't be able to program it using USB serial until a bootloader is installed. If you already have an Uno, you can use the Uno as ISP to install the bootloader. This page shows how to set up a bare 328 chip in a breadboard and install a bootloader. You can buy 328 chips with the (optiboot) bootloader already installed. That you can just plug into the Uno. I can't say where to buy one as I haven't bought a pre-loaded one in a long time.

What does the -PU mean?

http://www.lydiard.plus.com/chapter2.htm

If you are not familiar with the 'Arduino Pro Mini', it is an all in one package solution for stand alone projects.

It is cheaper than the Atmeg328P-PU!

Thank you,

My goal is longer term battery operation, so I really like the pro mini idea, I think I will try that first.

Remove the power LED from the pro mini to reduce power draw.

More power saving strategies from Nick Gannon.