Hello to all. I'm a total novice to Arduino. So please excuse the ignorance. I recently purchased an Uno R3 and a Pro Mini. As I await my spoils in the mail. I have been spending hours reading up.
I want to program ATTiny chips and ATMega328p chips.
My main concern is with the programming of the ATMega328p. If the 328 chip comes with the bootloader on it, is it as simple as popping the 328 out of the Uno and placing the other chip in the Uno and uploading a sketch to it? Can you use it this way?
I'm very new to this all. I thank you for your patience and insight.
Start with the Uno; make a led blink; and change the sketch (the code). That is how to start
Did you buy the ATmega328P from Ebay? I don't trust those bootloaders, I always burn the newest bootloander onto it.
To program an ATtiny or write the bootloader into the ATmega328P, you need a programmer. Luckely, your Arduino Uno can be a programmer. It is called ArduinoISP. That is what you see at Nick Gammon's site that ChilliTronix links to. Or you can use a cheap USBasp programmer.
Did you read about fuses ? ( AVR® Fuse Calculator – The Engbedded Blog )
When you use the Arduino IDE (the Arduino development environment) to burn a bootloader, also the fuses are set right.
When I use ATtiny or ATmega chips, I have my circuit in a way that I can always upload new code. For an Arduino compatible ATmega, only the RX and TX and RESET are needed. With a usb-serial adapter new code can be uploaded.
In most cases I like to change something in the code after the ATtiny or ATmega is soldered in the circuit. When I didn't do that, I had to cut it out of the circuit and solder a new one in
You shouldn't constantly pop the IC in and out of the socket of the Arduino. While it can be done, it isn't recommended as the IC socket isn't designed for a large number of insertions and removals; eventually, the contacts in the socket will become weak, and you'll get intermittent connections (leading to all sorts of fun debugging - not).
Instead, if you want to develop on the Arduino, then move the chip to an "embedded" circuit, and replace the ATMega328 with a new one - look into using or building a "Zero Insertion Force (ZIF) Socket" shield (or build your own similar interface) - ie:
This will allow you to pop the chip in place, close a lever to make the contacts, program it, then pop the lever to swap it out - without wearing out the DIP socket contacts.