Adv . Micro. Programming ATmega8 using Arduino IDE.docx
Adv . Micro. Programming ATmega8 using Arduino IDE.docx
Adding ATmega8 support to Arduino IDE using board manager (installing MiniCore)
Adding ATmega8 support to Arduino IDE using board manager (installing
MiniCore)
ATmega8 pinout is shown in the following figure.
To burn Arduino bootloader, we need to make our Arduino UNO as an ISP. There’s
a sketch named ArduinoISP in the built-in examples of Arduino IDE. Follow these
steps to program your Arduino UNO as an ISP.
Open File > Examples > 11.ArduinoISP > ArduinoISP
Upload this sketch to your Arduino UNO.
Step Three: Burning Bootloader
● Connect Arduino to ATmega8 as below.
Arduino ----------ATmega8
SCK / Pin 13 ----------SCK / PB5
MISO / Pin 12 ----------MISO / PB4
MOSI / Pin 11 ----------MOSI / PB3
SSN / Pin 10 ----------RESET
Successful bootloader burning. If the operation was successful, it says “Done burning
bootloader”.
Part Two: Programming ATmega8 Using Arduino IDE and a USB to TTL
Convertor
Here we have an ATmega8 with Arduino bootloader. As you know, there is a USB
to TTL convertor on all Arduino boards. It acts as a bridge between microcontroller
and Arduino IDE. We use CH340 USB to TTL convertor module to upload the
sketch to ATmega8.
Step Four: Setting up the Connections
Connect components as shown below.
CH340 ---------- ATmega8
VCC ---------- VCC
GND ---------- GND
Tx ---------- RX / PD0
Rx ---------- Tx / PD1