Reprogramming The Attiny85 - OLIMEX OLIMEXINO-85 User Manual

Arduino-compatible board
Table of Contents

Advertisement

OLIMEX© 2015
OLIMEXINO-85 user's manual

2.6 Reprogramming the ATtiny85

During your work you might accidentally delete the bootloader on the microcontroller or even
worse – you might burn the ATtiny85 microcontroller.
In both cases you would need to download the default bootloader to ATtiny85 to be able to connect
and program via the Digispark's Arduino.
Since the OLIMEXINO-85 lacks the required interface you would need jumper wires or your own
external socket suitable for the task. You might find a table with correct connections and operations
required to do in chapter 4.2 of this user's manual.
The binaries with the bootloader are found in the demo archive that might be downloaded from
OLIMEXINO-85's web-page. The hex and elf sources are placed in the "OLIMEXINO-
85_firmware" folder.
When you get the files and fix the connections you would need a tool able to upload the bootloader
to the ATtiny85 target via your programmer. There are two main software environments used:
1) Use AVR/Atmel Studio or AVRDude to upload respectively the .elf or the .hex to the target
ATtiny85.
The .elf file contains the proper fuses and configuration bits. You have to set them manually if you
use the .hex file.
Extended fuse should be: 0xFE – this value enables self programming and keeps the serial
programming enabled
High fuse should be: 0xDD – this values sets PLL Clock; start-up time PWRDWN/RESET: 1K
CK/14 CK + 64 ms
Low fuse should be: 0xE1 – this values sets brown-out detection at VCC=2.7 V
2) If you use AVRDude then you need to pass the fuse settings as command line:
lfuse:w:0xE1:m -U hfuse:w:0xDD:m -U efuse:w:0xFE:m
Usually the command to program the board via AVRDude looks like:
avrdude -c stk500v2 -P com26 -p t85 -U flash:w:Olimexino-85_ProductionTest_v_1_0_0.hex -U
lfuse:w:0xE1:m -U hfuse:w:0xDD:m -U efuse:w:0xFE:m
,where
stk500v2 is the programmer's interface abbreviation as per AVRdude's documentation
t85 is the abriviation of the name of the target microcontroller as per AVRdude's documentation
Olimexino-85_ProductionTest_v_2_0_1.hex is the name of our binary code.
Page 10 of 23

Advertisement

Table of Contents
loading

This manual is also suitable for:

Olimexino-85sOlimexino-85-kitOlimexino-85-asm

Table of Contents