Bootload atmega8-pu16 with Arduino Uno

A friend of mine had bought several atmega8-16PU’s , I myself have an arduino uno, with atmega328PU on it, I’ve been looking at the tutorial “arduinotobreadboard” http://arduino.cc/en/Tutorial/ArduinoToBreadboard

Now here’s my question. if i want to boatload this atmega8-pu16, do i leave my original atmega328 in the arduino? the tutorial says i have to remove it when i upload a program to the atmega8 on the breadboard.But i’m not sure if i have to remove the atmega from my arduino when i’m bootloading.

I’m just a bit confused on how exactly to use the arduino as bootloader, do i put the arduinoisp software on the original arduino, and let it be powered by usb,which in turn will boatload the other atmega?
Or do i remove the original atmega328 alltogether and bootload the atmega8 on the breadboard using the arduino board itself without it’s microprocessor?

Thanks in advance,
Romninja

I decided to just "do it", i get this error:

avrdude: Expected signature for ATMEGA328P is 1E 95 0F Double check chip, or use -F to override this check.

Can i change the program to work with atmega8-pu16 by changing settings in rpeferences like some other people said? how do i do this? No clue.

Last thing i did was change the board to atmega8 and tried bootloading with arduinoa s isp, so i got the arduinoisp on my arduino, now i get this error

avrdude: stk500_getsync(): not in sync: resp=0x00

I'm taking a break. tomorrow another day.

Using the Arduino as ISP sketch, you need the 328 in the Uno to be the programmer, and your blank chip (on a breadboard or whatever) to be the target.

The reason for taking the 328 out of the Uno board during uploading is because you're just using the Uno board as a USB-to-serial adapter then, and the onboard MCU would conflict while the PC is talking to the target. But, while programming, you're using the Uno as an AVR programmer, which requires brains in addition to serial.

So: You set your Board to the Uno, upload the ISP sketch, then set your Board to the target chip platform, Burn Bootloader (using AVR as ISP), then you can pop the 328 out, connect the TX and RX to your new chip, set the Board to whatever is compatible with the target bootloader/chip combo, and upload your sketch.

add

uno8.name=Arduino Uno with Atmel8
uno8.upload.protocol=arduino
uno8.upload.maximum_size=7168
uno8.upload.speed=115200
uno8.bootloader.low_fuses=0xff
uno8.bootloader.high_fuses=0xde
uno8.bootloader.extended_fuses=0x05
uno8.bootloader.path=optiboot
uno8.bootloader.file=optiboot_atmega8.hex
uno8.bootloader.unlock_bits=0x3F
uno8.bootloader.lock_bits=0x0F
uno8.build.mcu=atmega8
uno8.build.f_cpu=16000000L
uno8.build.core=arduino
uno8.build.variant=standard

in hardware\arduino\boards.txt and select Arduino Uno with Atmel8 from the ide when compiling. Thats it.

Yeah i followed sir nickity's instructions and it worked out, the STK not in sync is something with usb, sometime you just have to plug the arduino out and back in to solve that. if i ever run into this again i'll come back to this post and try your method,fateth, thank you for your response! (even though it was a bit late, but still,thanks!)

fateth: add

uno8.name=Arduino Uno with Atmel8
uno8.upload.protocol=arduino
uno8.upload.maximum_size=7168
uno8.upload.speed=115200
uno8.bootloader.low_fuses=0xff
uno8.bootloader.high_fuses=0xde
uno8.bootloader.extended_fuses=0x05
uno8.bootloader.path=optiboot
uno8.bootloader.file=optiboot_atmega8.hex
uno8.bootloader.unlock_bits=0x3F
uno8.bootloader.lock_bits=0x0F
uno8.build.mcu=atmega8
uno8.build.f_cpu=16000000L
uno8.build.core=arduino
uno8.build.variant=standard

in hardware\arduino\boards.txt and select Arduino Uno with Atmel8 from the ide when compiling. Thats it.

Thank You. This worked for Me. On Debian /usr/share/arduino/hardware/arduino/boards.txt