New bootloader file for ATmega8L

When using the LCD I/O Backpack with the ATmega8L-8AU, you need a bootloader that runs at 8 MHz.

But the one shipping with Arduino for the ATmega8 has some less than ideal settings, most annoyingly a very long startup delay and a low speed for the serial programming.

I have now made a re-compile of the bootloader with these two settings changed (about 1 second startup delay and 19200bps serial speed), which results in faster programming, and a much shorter startup time, both from power-on but also after a soft reset following programming.

All you need, is to download the .hex file and place in in the atmega8 folder under hardware/arduino/bootloaders in the Arduino environment and modify the boards.txt file to include this new bootloader.

On Mac, you have to right-click the Arduino.app and select ‘Show Package Content’ and navigate to Content/Resources/Java/hardware/arduino/bootloaders to find the atmega8 folder.

I have used the following segment in boarts.txt to reference this file in the Arduino environment.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
##############################################################
 
atmega8l.name=LCD I/O Backpack w/ ATmega8L @ 8MHz
 
atmega8l.upload.protocol=stk500
atmega8l.upload.maximum_size=7168
atmega8l.upload.speed=19200
 
atmega8l.bootloader.low_fuses=0xdf
atmega8l.bootloader.high_fuses=0xca
atmega8l.bootloader.path=atmega8
atmega8l.bootloader.file=ATmega8L.hex
atmega8l.bootloader.unlock_bits=0x3F
atmega8l.bootloader.lock_bits=0x0F
 
atmega8l.build.mcu=atmega8
atmega8l.build.f_cpu=8000000L
atmega8l.build.core=arduino
atmega8l.build.variant=standard
 
##############################################################

Downloads
Below is just the .hex file, zipped up to avoid corruption. The source is the same as the source that comes with the Arduino environment (in the hardware/atmega8 folder) just adjusted to 8MHz and with a timeout of 1000000)

Tip
If you want to compile your own, you might have to use the AVR-GCC compiler from one of the older Arduino enviromnents (I used Arduino-0010 on Mac), since the newer AVR-GCC complains a bit.

Update for users of Arduino 1.0 and later
Ray has notified me about a problem when using the above instructions with Arduino 1.0. The reason for the error he is getting is a change that the Arduino team has made, which my instructions didn’t take into account. I have updated the text you need to add to the boards.txt (added the last settings line), which tells the compiler what pins settings to use, when compiling for the ATmega8L.

Related posts:

  1. Programming the LCD I/O Backpack with an Arduino Since the workshop in the beginning of October, there has...
  2. Ultimaker 3D Printer Assembly Timelapse About a month ago, I received my Ultimaker 3D printer...
  3. Alternative programming cable for LCD I/O Backpack Following up with yet another alternative to the FTDI cable...
  4. Introducing the LCD I/O Backpack I admit, it has been a little slow for the...

About Thomas Flummer

I'm an electronics engineer, primarily working with web related software development in my professional life, but in my free time, likes to tinker with various electronics projects, mostly focusing on the bridge between computer and the physical world.