ATmega8 instead of ATmega328

Hi everyone,
I have an Arduino Uno Board with an ATmega328 on it.

I want to program an ATmega8, but I don't have any hardware devices for connecting the chip to the computer. So I had the idea to put the ATmega8 instead of ATmega328 into the Arduino Board, I've also checked the pin assignment on both ATmega chips, they do not differ (as far as I can say that).

Is it possible to do so or do I have to buy an ATmega8 programmer?

Thanks for your help,
Max :slight_smile:

No problem, you can do that.
How will you get a bootloader into the ATmega8 ?

What exactly is a bootloader?
What do I have to do to get the code into the ATmega8? I just want to make a curcuit like this, I just don't know how to program the chip, because I've only worked with Arduino Uno until now

I forgot the picture

A bootloader is code that is started as the Arduino Uno starts.
It is in a protected part of the flash.
The bootloader takes care of writing the sketch into the flash.

Take a look at the schematic of the Arduino Uno

Or the schematic of the minimal Pro Mini

They have a circuit at the /RESET pin. It is used to upload a sketch.

This is how to make a standalone:

This is how to upload the bootloader:

Look at Nick Gammons Arduino as bootloater also.

I think if you look at some of the older boards, they were made from Atmegas.
See ArduinoNG on this page.
I think this board is still listed under the IDE's Tools:Board list.

Thanks for the answers, I'll try that!