Arduino UNO as ISP, OptiLoader sketch and Arduino IDE 1.6.5.
This is one of the 4 methods I will be describing for programming an ATmega8 with a Bootloader. I have split this instructable in four sections so that the reader can directly access its preferred method.
In this section, we will use arduino UNO, OptiLoader sketch and Arduino IDE 1.6.5. If you haven’t yet read the introduction this is a good time to do it…Programming an ATmega8 with a Bootloader: Intro.
Now, let’s use OptiLoader sketch…..
After downloading optiLoader go to your Arduino SKETCHBOOK directory where your sketches reside and create a new directory named ‘OptiLoader-master’ and put the files inside it.
Upload your Arduino UNO with the optiLoader sketch using Arduino IDE 1.0.5. or 1.6.5.
Use following setup:
For each target board, connect the ISP connector and hit the reset button on the optiLoader Arduino, or use the “G” command in the Serial Monitor. Programming the bootloader takes about 5 seconds, and reports status and information to the Arduino serial monitor (be sure that you set baud rate to 19200).
Test using FTDI chip:
Once the target chip (ATmega8) has the bootloader, just load your code through a normal serial connection. It requires the following:
Use a 0.1uF cap between DTR and the reset pin. From there, all you need are 4 pins to connect to the target circuit – Ground, reset, Tx, Rx. This way you don’t need another Arduino to load code, and the serial monitor will work through the same hardware. Use any Arduino IDE!!
- Connect FTDI connector as serial
- DTR to pin 1 via 0.1 uF cap
- Reset pin1
- ATmega8 pin2 Rx connect to FTDI Tx
- ATmega8 pin3 Tx connect to FTDI Rx
- Tools menu:
- Serial: Choose your COM port
- Board: Atmega8 optiboot (8mhz external OSC)
- Programmer: USBTinyISP
- Upload blink sketch!!
- no need to use upload using programmer, i.e., shift + upload arrow
- Press arrow (upload button).
You are done!
There are other ways:
Follow this excellent instructable:
How to override bootloader:
Just upload a sketch using a programmer and an ISP connection. This will automatically override the bootloader and use the full space of the flash memory.