Programming an ATmega8 with a Bootloader: Part IV

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…..

https://github.com/WestfW/OptiLoader

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!

BONUS:

There are other ways:

Follow this excellent instructable:

http://www.instructables.com/id/How-to-burn-optiboot-botloader-on-Atmega8-with-Ard/?ALLSTEPS

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.

REFERENCE:

https://github.com/technologiescollege/arduino/tree/master/hardware/arduino/avr/bootloaders/optiboot

https://github.com/Optiboot/optiboot

https://github.com/Optiboot/optiboot/wiki/InstallingOnChips

https://github.com/WestfW/OptiLoader

http://www.wormfood.net/avrbaudcalc.php

http://birdslikewires.co.uk/revisiting-arduino-bootloaders

http://www.indianbeantree.co.uk/wiki/index.php?title=ATMega8_Arduino

http://www.instructables.com/id/Standalone-Atmega8-16pu-with-Arduino-Optiboot-Boot/?ALLSTEPS

http://tutorial.cytron.com.my/2015/02/04/using-isp-to-burn-bootloader-into-arduino/

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: