User Tools

Site Tools


burning_bootloader

Burning bootloader

The Paperduino Tiny runs the “micronucleus tiny85” bootloader version 1.06, an open source project written by Bluebie: https://github.com/Bluebie. Digistump supported the development and donated the VID/PID pair for the USB device.

You can find the source in: https://github.com/micronucleus/micronucleus

You can download bootloader: micronucleus-1.06-upgrade.hex.zip

It is very important to use correct fuses bit when burning bootloader to ATtiny85, below list the fuses bit for burning bootloader:

Extended: 0xFE
High: 0xDD
Low: 0xE1

Please note that these fuses setting not enable reset pin (ATtiny85 pin 1) as I/O pin, so you only have 5 I/O pins but you are able to reprogramm ATtiny85 with other software withou HV programmer.

If you are experienced user you can set RSTDSBL bit to enable 6 I/O pins:

High: 0xD5

With an ISP Programmer

With avrdude and USBasp with RSTDSBL:

avrdude -c usbasp -p t85 -U flash:w:micronucleus-1.06-upgrade.hex -U lfuse:w:0xe1:m -U hfuse:w:0x5d:m -U efuse:w:0xfe:m

Without RSTDSBL:

avrdude -c usbasp -p t85 -U flash:w:micronucleus-1.06-upgrade.hex -U lfuse:w:0xe1:m -U hfuse:w:0xdd:m -U efuse:w:0xfe:m

With Raspberry Pi

You will need:
Raspiberry Pi
5 x 1K resistors (or similar)

A connection to the GPIO of the Pi, and a breadboard and wire.

Setup the Raspberry Pi - enable SPI in raspi-config
Download and build avrdude

sudo apt-get install bison automake autoconf flex git gcc
sudo apt-get install gcc-avr binutils-avr avr-libc
git clone https://github.com/kcuzner/avrdude 
cd avrdude/avrdude
./bootstrap && ./configure && sudo make install

Download and build WiringPi for the gpio commands

cd ~
git clone git://git.drogon.net/wiringPi
cd wiringPi
./build 

Connect up the ATtiny85 to the Raspberry Pi GPIO
Test avrdude connection to the ATtiny85, we are set up with GPIO pin 22 on the ATtiny reset. We must pull this pin low to program the chip. This can be done in other ways, e.g. a switch, but I an using another pin of the GPIO to do this.

sudo gpio -g mode 22 out
sudo gpio -g write 22 0
sudo avrdude -p t85 -P /dev/spidev0.0 -c linuxspi -b 10000
sudo gpio -g write 22 1

This must give success type messages!

Programm bootlader

sudo gpio -g mode 22 out
sudo gpio -g write 22 0
avrdude -P /dev/spidev0.0 -c linuxspi -b 10000 -p t85 -U flash:w:micronucleus-1.06-upgrade.hex -U lfuse:w:0xe1:m -U hfuse:w:0x5d:m -U efuse:w:0xfe:m
sudo gpio -g write 22 1

Hackers way with ISP programmer made from USB keyboard

You can make ISP programmer from old USB keyboard:
http://wiki.steve-m.de/hidkey_gpio

Get preprogrammed MCU with bootloader from us

If you are not able to burn bootloader you can buy ATtiny85 with bootloader + 3 original paperduino cards for 5 USD with Worldwide shipping.

burning_bootloader.txt · Last modified: 2014/04/05 09:04 by ondra