AVR Chips on the arduino uno come loaded with a bootloader to run the usb communication & arduino stdlib. This is how to go from a blank chip to a flashed chip.
Pin connections:
16MHz Crystal across PB6/PB7
connect 22pF bipolar caps from the crystal to ground:
GND
PB6 ----------|-------[22pF]--|
[Crystal] |
PB7 ----------|-------[22pF]--|
Pin R10k pullup to +5V
AVCC connected to +5V
also might be useful to have pwr indicator LED
File → Examples → 11.ArduinoISP → ArduinoISP10 -> MOSI (17) 11 -> MISO (18) 12 -> SCK (19) 13 -> RESET ( 1)
Tools → Programmer → Arduino as ISPAtmega328 in Tools → Board and make sure the variant based on the chip you have.Tools → Burn BootloaderFrom the ISP dongle, make the connections to the chip
| ISP Pin | Atmega Pin |
|---|---|
| VCC | VCC |
| GND | GND |
| MOSI | MOSI (17) |
| MISO | MISO (18) |
| SCK | SCK (19) |
| RST | RESET (1) |
Then upload the code with Sketch → Upload using Programmer.