Tutorials
Saturday, 30 November 2013 11:54

Arduino running at 8MHz internal clock with Optiboot bootloader

Written by 
The breadboard.zip hardware configuration archieve is not working on Arduino software version 1.0 and above
 
Here is my boards.txt setup for ATMega328 which is working on version 1.0 and above
Modify the file ...\your_arduino_folder\hardware\arduino\boards.txt by adding these few lines:

##############################################################
atmega328bb.name=ATmega328 Optiboot (8MHz internal clock)
atmega328bb.upload.protocol=arduino
atmega328bb.upload.maximum_size=30720
atmega328bb.upload.speed=57600
atmega328bb.bootloader.low_fuses=0xE2
atmega328bb.bootloader.high_fuses=0xDA
atmega328bb.bootloader.extended_fuses=0x05
atmega328bb.bootloader.path=arduino:optiboot
atmega328bb.bootloader.file=optiboot_atmega328.hex
atmega328bb.bootloader.unlock_bits=0x3F
atmega328bb.bootloader.lock_bits=0x0F
atmega328bb.build.mcu=atmega328p
atmega328bb.build.f_cpu=8000000L
atmega328bb.build.core=arduino
atmega328bb.build.variant=standard

 
And here is the boards.txt setup for ATMega8

##############################################################
atmega8noxtal.name=ATmega8 Optiboot (8MHz internal clock)
atmega8noxtal.upload.protocol=arduino
atmega8noxtal.upload.maximum_size=7168
atmega8noxtal.upload.speed=38400
atmega8noxtal.bootloader.low_fuses=0xe4
atmega8noxtal.bootloader.high_fuses=0xc4
#atmega8noxtal.bootloader.path=atmega8_noxtal
atmega8noxtal.bootloader.path=optiboot
atmega8noxtal.bootloader.file=optiboot_atmega8.hex
atmega8noxtal.bootloader.unlock_bits=0x3F
atmega8noxtal.bootloader.lock_bits=0x0F
atmega8noxtal.build.mcu=atmega8
atmega8noxtal.build.f_cpu=8000000L
atmega8noxtal.build.core=arduino
atmega8noxtal.build.variant=standard

 
Note: Do not modify the boards.txt in your Arduino sketch folder (eg. ...\My Documents\Arduino\hardware\...boardx.txt), it will not work.
 
 

Using an Arduino board to burn the bootloader
If your ATMega8/ATmega328 already configured to use external clock, then wire up the Arduino board & microcontroller as show in figure 1, otherwise (microcontroller configured to use internal clock) you can follow either figure 1 or figure 2.

Fig. 1 Using an Arduino board to burn the bootloader

 

Fig. 2 Using an Arduino board to burn the bootloader

  • Upload the ArduinoISP sketch onto your Arduino board.
  • From Tools>Board menu, select ATmega328 Optiboot (8MHz internal clock) if you want to burn the bootloader on ATMega328 microcontroller
  • From Tools>Board menu, select ATmega8 Optiboot (8MHz internal clock) if you want to burn the bootloader on ATMega8 microcontroller
  • From Tools>Programmer> menu, select Arduino as ISP
  • Select Burn Bootloader from Tools menu to start burning bootloader to microcontroller
Read 16043 times Last modified on Saturday, 30 November 2013 14:06

1 comment

  • Comment Link Philipp Tuesday, 23 February 2016 20:01 posted by Philipp

    Works with Version 1.0.5 fine.

    Didnt works in 1.6.5, there are more than one errors in board.txt

    But nice work, in my case it works fine.

Leave a comment