I have one atmega 8
now I want program it using arduino IDE
I didnt burn bootloader in it
so how can I program it using arduino IDE ?
Any changes I need to make to the arduino IDE ?
Check boards.txt, see if any of the older boards used that processor.
If not, check avr-developers.net (.com? .org?) for core files to use with the IDE.
You are going to need an in=circuit programmer in order to burn the bootloader on to the ATmega8. seeing as how the bootloaders purpose is so that you can upload sketches to the MC using the IDE.
They are generally around 25 to 45 dollars. I would recommend getting a good one. It may be more expensive but its so worth the few extra bucks to avoid all the hassle.
This one will work well too. It's what I use.
http://www.mdfly.com/index.php?main_page=product_info&cPath=5&products_id=415
You can burn a bootloader to the atmega8 by using Arduino as ISP ( http://arduino.cc/en/Tutorial/ArduinoISP )
In the beginning I suggest that you just choose "Arduino NG or older w/Atmega8" after you have uploaded the ISP sketch to your arduino, and then choose "Arduino as IPS" in the menu, and hit "burn".
If you want to upgrade later, you can choose the optiboot bootloader for the atmega 8, witch is a great bootloader.
I've done it in the recent past. I added the following to the boards.txt file:
##############################################################
atmega8u.name=ATMEGA8
atmega8u.upload.protocol=arduino
atmega8u.upload.maximum_size=7680
atmega8u.upload.speed=115200
atmega8u.bootloader.low_fuses=0xff
atmega8u.bootloader.high_fuses=0xcc
atmega8u.bootloader.path=optiboot
atmega8u.bootloader.file=optiboot_atmega8.hex
atmega8u.bootloader.unlock_bits=0x3F
atmega8u.bootloader.lock_bits=0x0F
atmega8u.build.mcu=atmega8
atmega8u.build.f_cpu=16000000L
atmega8u.build.core=arduino
atmega8u.build.variant=standard
##############################################################
The only other trick is to get a programmer or another Adruino board that you can use as a programmer. I've had success with the parallel programmer described elsewhere on this site, it is a lot cheaper than the commercial programmers. Of course it will only work if your PC has a parallel port. A USB type programmer is a bit easier to work with though.
I had to make some modifications to Christo's boards.txt code to make it work with Arduino IDE version 1.82.
atmega8u.name=ATMEGA8
atmega8u.upload.tool=avrdude
atmega8u.upload.protocol=arduino
atmega8u.upload.maximum_size=7680
atmega8u.upload.maximum_data_size=1024
atmega8u.upload.speed=115200
atmega8u.bootloader.low_fuses=0xff
atmega8u.bootloader.high_fuses=0xcc
atmega8u.bootloader.file=optiboot/optiboot_atmega8.hex
atmega8u.bootloader.extended_fuses=
atmega8u.bootloader.unlock_bits=0x3F
atmega8u.bootloader.lock_bits=0x0F
atmega8u.bootloader.tool=avrdude
atmega8u.build.board=AVR_NG
atmega8u.build.mcu=atmega8
atmega8u.build.f_cpu=16000000L
atmega8u.build.core=arduino
atmega8u.build.variant=standard