Introduction: Burning the Bootloader on ATMega328 Using Arduino UNO As ISP

Picture of Burning the Bootloader on ATMega328 Using Arduino UNO As ISP

UPDATE 2: For everyone still having problems finding the previous versions of the software, please refer to this page: https://www.arduino.cc/en/Main/OldSoftwareReleases#previous

UPDATE: This tutorial will work on Arduino IDE 1.0.1, the recent 1.0.5 makes some changes on the ISP sketch so I'm not sure if it will work (I just bought 2 ATMega328 and burned both on 1.0.1).

Please use 1.0.1 to eliminate any problems. Click Here


I had one remote controlled project that needed an Arduino running 24/7 but I didn’t want to leave my $32 Arduino UNO, so I decided to buy some pieces and created my own Arduino. The most important part was buying the microcontroller. These were my options:

ATMega328P-PU with Optiboot ~ $5.50 (Sparkfun) / $5.19 (Digikey)
ATMega328P-PU ~ $3.16 (Digikey)
ATMega328-PU ~ $2.88 (Digikey)

Obviously I bought the cheaper one, huge mistake. After some research I found that my first option was the straight one. Just plug it as a normal Arduino, the last two needed something else.

The last two options were missing something called a bootloader. A bootloader is “a small program that has been loaded on to the microcontroller. It allows you to upload code without using any additional hardware.”

So first if you were to do anything on those microcontrollers you need a bootloader burned on those chips. As you may have notice, the difference between the second and the third is just a mere P after the 328. This P means pico for picopower which is a technology ATMEL has developed that allows the microcontroller to run with less power.

Well if you see the microcontroller on your Arduino UNO you will find out that it is using the picopower micro, not the normal one. I bought 3 normal ones. OMG then I’m totally screw. Well no, you just have to make a pair of changes on your Arduino files to make it work.

This tutorial will teach you how.

Step 1: Materials

Picture of Materials

We will need the following materials:

1 USB cable to connect PC-Arduino
1 Arduino UNO (I’m using R1)
1 ATMega328-PU 
1 Small breadboard
1 16Mhz Crystal (mine had 20pF of capacitance)
2 22pFCeramic Capacitors

... And some jumper wires


Step 2: Setting Your Arduino As ISP

Picture of Setting Your Arduino As ISP

First we need to tell our Arduino UNO (in my case an Arduino UNO R1), to know that whatever we are sending is not for it, but for our other micro. In other words we are making our Arduino a simple transmitter. For this I'm using version 1.0.1 of the Arduino Software (IDE).

1. Plug in your Arduino UNO through USB to your computer. (WITH NOTHING CONNECTED, JUST USB)
2. Open de IDE
3. Open > Examples > ArduinoISP
4. Select Arduino UNO from Tools > Board
5. Select your serial port from Tools > Board (Mine is usually COM3, but it may change.)
6. Upload sketch.

It takes a while. After it finishes, close de IDE and disconnect your Arduino. Now is time to prepare the software and hardware.

Step 3: Preparing the Hardware

Picture of Preparing the Hardware

This is the easy part, just use the diagram to connect every piece.

Step 4: Preparing the Software

Picture of Preparing the Software

Well this is not the easy part, but you just need to follow the instructions carefully. I've added 2 files, that you need to replace. Follow the instructions to replace.

0. Make sure your IDE is closed.
1. Make a copy of the complete folder where your IDE is. (I named mine BURN BOOTS)
2. Open the new folder.
3. Navigate to ...\arduino-1.0.1 BURN BOOTS\hardware\tools\avr\etc
4. Find a file called avrdude.conf
5. Replace it with the file I attached. (You need to extract it first, Instructables didn't allow me to send it, so I had to compress it.)
6. Navigate to ...\arduino-1.0.1 BURN BOOTS\hardware\arduino
7. Find a file called boards.txt
8. Replace it with the file I attached.
9. Close everything.

Excellent, now we only have to burn the bootloader and our cheapy micro will work just like a normal one.

Step 5: Last Step!! Burning the BOOTLOADER

Picture of Last Step!! Burning the BOOTLOADER

With everything connected open de IDE from the folder you just created (the copy).

1. Select Arduino328 from Tools > Board
2. Select your serial port (same as before).
3. Select Arduino as ISP from Tools > Programmer
4. Select Burn Bootloader

It will take like 30 seconds, and voila! You can now use your cheap, not pico, ATMega328 as a normal Arduino.
I hope you found this useful, if you do don't forget to click on fave. 

Comments

Rohan Khairnar (author)2017-12-16

after uploading arduinoISP code i follow the process and make connection.But after this when i connect my arduino Uno to computer using USB it does not ON.Means after established connection the primary arduino not ON.

Hardik Chauhan (author)2017-12-05

Error

bootloader successfully burn but when try to upload sketch error comes"MCU atmega328' supported for assembler only"

MohammadU18 (author)2017-10-21

bootloader successfully burn but when try to upload sketh error comes"MCU atmega328' supported for assembler only"

AnkitS139 (author)MohammadU182017-11-30

hey

MohammadU18how you resolve this ?

AnkitS139 (author)AnkitS1392017-12-01

Blink:-1: error: MCU 'atmega328' supported for assembler only

AnkitS139 (author)2017-11-30

Hey

manu08

I followed all the steps as mentioned and successfully boot loaded atmega328-pu. But how to dump program in it to make it independent and use in multiple application without arduino uno board.

Kindly give some assistance asap.

Thanks

CliffG1 (author)2017-11-29

There is an error in image at "Step 3" . The descriptions for UNO pin 11 to Atmega pin 17, and UNO pin 12 to Atmega pin 18 are reversed.

-- UNO pin 11 to Atmega pin 17 = (MOSI)

-- UNO pin 12 to Atmega pin 18 = (MISO)

per Atmel datasheet and UNO pinout.

cheers!

RoOtZ1 (author)2017-11-28

if i didn't use thoes am i gonna have problem ?

{ 16Mhz Crystal (mine had 20pF of capacitance)

22pFCeramic Capacitors}

MohammadU18 (author)2017-10-21

hurray its working

thanks a lot sir

ravindra12 (author)2017-10-03

can i use arduino IDE 1.8.4 to burn bootloader atmega328??

Harish Gajjar (author)2017-08-07

but after bootloading how to burn working blink program in atmega328-pu using ardunio board??

Harish Gajjar (author)2017-08-07

i really appreciate your work!!It's working ....to burn boot loader in atmega328-pu using Ardunio board.

thank you!!

RâfëêqÑ made it! (author)2017-06-04

Sir.. im wasted my two days for burning boot loader.. but aftr trying this.. worked properly... thank you so much

sowais672 (author)2016-09-18

Arduino: 1.6.10 (Windows 7), Board: "Arduino328"

Error while burning bootloader: missing 'bootloader.tool' configuration parameter

This report would have more information with

"Show verbose output during compilation"

option enabled in File -> Preferences.

ArturP16 (author)sowais6722016-09-22

I had the same problem.

if you have atmega328P-PU use optiloader (from github - fast and easy, works with 1.6.10)

if you have atmega328-PU use this tutorial but download arduino ide 1.0.5

sowais672 (author)ArturP162016-09-25

but 1.0.5 is not available, I have search alot!!

ArturP16 (author)sowais6722016-09-26

Ok, to make your work easier I made this http://www.filedropper.com/arduino105-boot328

Download zip file. It is configured arduino ide 1.0.5. You dont have to do anything with files.

Just make connections, pick Board - arduino328, programmer arduino as ISP and press burn bootlader.

FIRTS of course upload Arduino ISP sketch to your arduino.

KHANI5 (author)ArturP162017-04-04

thanks dude!!! that also worked for me..

MayurB22 (author)ArturP162017-04-01

Hey thanks alot ! it worked for me very well :)

ArturP16 made it! (author)sowais6722016-09-26

Did you check arduino website?:) Link

https://www.arduino.cc/en/Main/OldSoftwareReleases...

and screen if you dont trust me:)

sowais672 (author)ArturP162016-09-30

thankyou so much bro, I have just checked it.

manu08 (author)sowais6722016-09-25

Check out this page. https://www.arduino.cc/en/Main/OldSoftwareReleases#previous

BramS3 (author)2016-08-01

The excess hardware is just for burning the bootloader correct? It can be removed once it has been "bootloaded".

manu08 (author)BramS32016-08-01

Yes sir, you are correct.

MohammadS79 (author)2016-07-23

I have uploaded bootloader successfully, but whenever i try to program atmega328 it shows error:

unkown MCU 'atmega 328 specified

known MCU Names:

avr2

at90s2313.............

MCU 'atmega328' supported for assembler only'

please help me.

19711 (author)2016-06-19

hi.i am mahdi.

After Burn Bootloader to Atmega328PU,i dont program it.how i can do it.?

RashidH4 (author)2016-04-02

Thank you Sir so much, it worked through my current Arduino IDE but using you instruction... :) you great thumps up

Rama. RajagopalanR (author)2016-03-28

Can any one help?.

Error while burning bootloader. I am using 1.6.5 version.

Rama. RajagopalanR (author)2016-03-28

Can any one help?.

Error while burning bootloader. I am using 1.6.5 version.

razimudassir (author)2016-03-20

Can i use 1.6.5 for this????

KornélS (author)2016-02-18

Can i burn the bootloader to an Atmega328(p) with raspberry pi? And then upload the sketches? If yes, how? I dont have usb to serial adapter. Thanks in advance, and sorry for my poor english

SajadS1 (author)2016-02-13

Arduino: 1.5.6-r2 (Windows 8), Board: "Arduino328"

Error while burning bootloader: missing 'bootloader.tool' configurataion parameter

how shoud I do?

TomášT11 (author)2016-02-02

Thank you very much. For me it worked. But I uploaded through my current "Arduino IDE" the arduinoISP sketch and then through your Arduino 1.0.1 only burned bootloader. But thanks.

psycho.maggot (author)2015-12-28

https://www.youtube.com/watch?v=g90xb0nNX50

JaskanwalS (author)2015-10-31

Arduino: 1.6.5 (Windows 8.1), Board: "Arduino328"

Error while burning bootloader: missing 'bootloader.tool' configuration parameter

pls help with this asap

biobuilder (author)2015-09-16

Excellent job making the board profile, by the way!

biobuilder (author)2015-09-16

Hey everyone, Here's a permanent way to fix the programming issue with ATMEL328 and still keep your UNO (ATMEL328P) programmable. You want the ATMEL328 device signature to be a Diecimila. However, the Boards.txt file included with the standard copy of Arduino (1.6.3) has a typo, which you will have to fix if you want to seamlessly program your Diecimila with ATMEL 328 instead of ATMEL 328P. Here's how you do it:

1. Find your Arduino Application

2. Go to Java, then hardware, then arduino, then avr, then find "boards.txt"

3. Make a copy of "boards.txt" in case you mess up

4. Find the line in "boards.txt" that says:

diecimila.menu.cpu.atmega328.build.mcu=atmega328p

5. Backspace the "p" off of the line so it looks like this:

diecimila.menu.cpu.atmega328.build.mcu=atmega328

6. save the txt file, restart Arduino, and you're Done!

Please note: Using this method will not allow you to simply plug the ATMEL328 into an old UNO shield and have it programmable via the USB cable. You will have to use a number of workarounds or program via ISP. It is possible to make your own board profile if you really want to do this, but chances are the ATMEL328 is destined for something other than a regular Arduino board.

Electronics King (author)2015-08-30

burning arduino bootloader with USBasp Programmer complete set by step guide

http://openelectronicsproject.blogspot.in/2015/08/...

MiebakaI (author)2015-08-12

Follow this procedures carefully to burn bootloader on newer IDE available now (In my case 1.7.5. but will work on your own).
¶ After making the connections as implied in this instructions.
¶ Open your IDE, on the top left corner, click on Tools > Board > Arduino Uno (if you are using ATMEGA 328P).
¶ Now click on Tools > Port > select your correct port (in my case i was COM24).
¶ Again click on Tools > programmer > Arduino as ISP.
¶Finally click on Tools > Burn bootloader.
Believe it after countless number of flashing it done.

hoboat33 (author)2015-06-25

I'm also getting the "Invalid device signature" message. Verbose gives me the Device ID of 0x000000. Is my chip toast?

luqmaan_0013 (author)2015-06-11

Yikes! Invalid device signature.

Double check connections and try again, or use -F to override

this check.

The connections are as per the diagram

I am using arduino 1.0.1 and atmega328 -pu .. i did not replace the files. please help.

BryanS6 (author)2014-12-17

avrdude: Yikes! Invalid device signature.

Double check connections and try again, or use -F to override

this check.

aditya jindal (author)BryanS62015-06-03

This is because you are not using the arduino 1.0.1 version. If you use it to burn bootloader on atmega328 - pu you don't have to use the files attached

guiheol (author)aditya jindal2015-06-05

I received the same message>

"avrdude: Yikes! Invalid device signature.

Double check connections and try again, or use -F to override

this check."

I used the arduino 1.0.1 version and i tried with and without the files attached.


=/

RobinB1 (author)2015-04-14

Thanks A bunch !

I followed the tutorial word-for-word and it worked.

Thanks Again

prageen (author)2014-12-19

i followed all the steps...n finally when I try to upload the bootloader I get the following error::

Error while burning bootloader: missing 'bootloader.tool' configuration parameter

pls help me..

invenTHOR (author)prageen2015-02-24

I guess you have used a newer version of the Arduino IDE. Make sure to use version 1.0.X !

ManirI (author)2015-02-08

Other methods
did not work. The following one did.

  1. Google search “How to
    burn bootloader”
  2. Goto: http://3g1l.com/blog-burn-bootloader-blank-atmega328atmega328p-arduino-uno
    read the document and comments. Follow the link or directly open the next
    step.
  3. Do the wiring as shown
    at: http://arduino.cc/en/Tutorial/ArduinoToBreadboard
  4. Create a directory
    named “optiLoader” preferably where your other Arduino or Processing sketches
    are
  5. Goto: https://github.com/WestfW/OptiLoader
  6. Open “optiLoader.h”,
    select all, paste in Notepad and save as “optiLoader.h” in the optiLoader directory
    created in the previous step
  7. Open “optiLoader.pde”,
    select all, paste in Notepad and save as “optiLoader.pde” in the optiLoader
    directory created in the previous step. Instead of “pde” you may give
    extension “ino”, it doesn’t make any difference
  8. Open Arduino IDE, form
    the IDE open “optiLoader.pde”. If you gave “ino” extension, you may
    doubleclick the icon, it will open in Arduino IDE
  9. Select the proper
    board, COM port and upload the sketch
  10. Open the Serial Port
    Monitor. Set the baud rate to 19200. If the 328Pee Poo is good,
    connections are good, you should see the success message as described in
    the optiLoader.txt file
  11. If you need more 328P
    PU to program, insert next one press “G” in the serial port, monitor
    window, press enter.

Note:

i) You NEED the oscillator and the capacitors.

ii) Copy, paste and save the “optiLoader.txt” just for reference.
It is not necessary though.

iii) If you download optiLoader-master.zip, you will get all three
files.

iv) If the baud rate is not set to 19200, garbled message is
received.

aggelou.vakis (author)2014-12-18

When I try to upload the bootloader I get the following error:

avrdude: Expected signature for ATMEGA328 is 1E 95 14

Double check chip, or use -F to override this check.

I use an ATmega328P-PU. What I do wrong?

About This Instructable

481,899views

488favorites

License:

More by manu08:Burning the Bootloader on ATMega328 using Arduino UNO as ISP
Add instructable to: