To use your Arduino board to burn a bootloader for Atmega 8 onto an AVR, you need to follow a few simple steps.
- Open the file location C:\Program Files (x86)\Arduino\hardware\arduino\avr
- Rename the file "platform" to "platform_ori"
- Download this "platform" file and copy to the current location
- Close the Window and then
- Open the ArduinoISP firmware (in Examples) to your Arduino board
- Select the items in the Tools > Board and Serial Port menus that correspond to the board you are using as the programmer (not the board being programmed).
- Upload the ArduinoISP sketch.
- Wire your Arduino board to the target as shown in the diagram below. (Note for the Arduino Uno: you'll need to add a 10 uF capacitor between reset and ground.)
- Select the item in the Tools > Board menu that corresponds to the board on which you want to burn the bootloader(not the board that you're using as the programmer). See the board descriptions on the environment page for details.
- Use the Burn Bootloader > Arduino as ISP command.
- See : http://onebyzeroelectronics.blogspot.in/2015/03/using-arduino-as-avr-isp.html for Hardware Connections
Circuit (targeting Arduino Uno, Duemilanove, or Diecimila)
An Arduino board serving as an ISP to program the ATmega on another Arduino board. On the Arduino Uno, you'll need to connect a 10 uF capacitor between reset and ground (after uploading the ArduinoISP sketch).