Flashing Bootloader Into Arduino UNO R3

31,027

26

6

Intro: Flashing Bootloader Into Arduino UNO R3

I bricked my arduino... again. And now I am out of pre-programmed chips. Time to flash bootloaders myself...

Luckily I have a USBtinyISP (v2.0). I had never used it though and I managed to struggle to load a bootloader into my arduino. So, for your (my) reference, here are the steps that allowed me to flash a batch of ATMega328 (and ATMega328p).

For this instructable you will need:
- 1 x arduino board
- 1 x USBtinyISP (pay about 10$ for it on ebay)

References:
http://www.ladyada.net/make/usbtinyisp/download.html
http://www.ladyada.net/make/usbtinyisp/avrdude.html



Step 1: Command Line Options for Avrdude

I performed said steps on a Windows box (running XP), so it is possible to do this on a PC ! The command lines should / must be exactly the same on a Linux box or an OSX box.

The arduino IDE installed on my box is arduino-1.0.1

In a terminal (a DOS prompt), cd into the directory arduino-1.0.1, then run:

hardware/tools/avr/bin/avrdude.exe -C hardware/tools/avr/etc/avrdude.conf -b19200 -c usbtiny -p m328p -v -e -U flash:w:hardware/arduino/bootloaders/optiboot/optiboot_atmega328.hex -U lock:w:0x0F:m -F

where:
  avrdude.conf: configuration file
  usbtiny: type of programmer (USBtiny)
  m328p: type of chip to program (ATMega328p)
  optiboot_atmega328.hex: magic file (bootloader) for Arduino UNO R3
  -F: force (for ATMega328 chips which are the same as ATMega328p for flashing purposes but are different enough so that they don't have the same signature as ATMega328p chips)

Attached is the avrdude output (avrdude.txt), enjoy...


Voila !

Share

    Recommendations

    • Furniture Contest 2018

      Furniture Contest 2018
    • Tiny Home Contest

      Tiny Home Contest
    • Fix It! Contest

      Fix It! Contest

    6 Discussions

    0
    None
    CodfishCatfish

    1 year ago

    The arduino may be a clone but its probably making use of counterfeit IC's, thus making it.....counterfeit.

    0
    None
    thewiz23

    4 years ago on Introduction

    Maybe your arduino wouldn't brick if you were using a real one instead of a counterfeit.

    1 reply
    0
    None
    nicooamandaghassaei

    Reply 5 years ago on Introduction

    Not really (any more).

    I had to re-flash my atmega328 because it was bricked: a faulty program had made the usb connection unresponsive so that the IDE could not connect to it.

    Also, different versions of arduino boards (diecimila, uno r3, etc..) may require different bootloaders.

    N.