Introduction: 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

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

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

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

Step 4: 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

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

author
R%C3%A2f%C3%AB%C3%AAq%C3%91 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

IMG_20170605_115214.jpgIMG_20170605_114711.jpg
author
sowais672 made it!(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.

author
ArturP16 made it!(author)2016-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

author
sowais672 made it!(author)2016-09-25

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

author
ArturP16 made it!(author)2016-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.

author
KHANI5 made it!(author)2017-04-04

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

author
MayurB22 made it!(author)2017-04-01

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

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

Did you check arduino website?:) Link

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

and screen if you dont trust me:)

f1.png
author
sowais672 made it!(author)2016-09-30

thankyou so much bro, I have just checked it.

author
manu08 made it!(author)2016-09-25

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

author
BramS3 made it!(author)2016-08-01

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

author
manu08 made it!(author)2016-08-01

Yes sir, you are correct.

author
MohammadS79 made it!(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.

author
19711 made it!(author)2016-06-19

hi.i am mahdi.

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

author
RashidH4 made it!(author)2016-04-02

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

author
Rama.+RajagopalanR made it!(author)2016-03-28

Can any one help?.

Error while burning bootloader. I am using 1.6.5 version.

author
Rama.+RajagopalanR made it!(author)2016-03-28

Can any one help?.

Error while burning bootloader. I am using 1.6.5 version.

author
razimudassir made it!(author)2016-03-20

Can i use 1.6.5 for this????

author
Korn%C3%A9lS made it!(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

author
SajadS1 made it!(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?

author
Tom%C3%A1%C5%A1T11 made it!(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.

author
psycho.maggot made it!(author)2015-12-28

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

author
JaskanwalS made it!(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

author
biobuilder made it!(author)2015-09-16

Excellent job making the board profile, by the way!

author
biobuilder made it!(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.

author
Electronics+King made it!(author)2015-08-30

burning arduino bootloader with USBasp Programmer complete set by step guide

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

author
MiebakaI made it!(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.

author
hoboat33 made it!(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?

author
luqmaan_0013 made it!(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.

author
BryanS6 made it!(author)2014-12-17

avrdude: Yikes! Invalid device signature.

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

this check.

author
aditya+jindal made it!(author)2015-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

author
guiheol made it!(author)2015-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.


=/

author
RobinB1 made it!(author)2015-04-14

Thanks A bunch !

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

Thanks Again

author
prageen made it!(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..

author
invenTHOR made it!(author)2015-02-24

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

author
ManirI made it!(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.

author
aggelou.vakis made it!(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?

author
bonbenk made it!(author)2014-12-24

I have the same problem. It was solved by adding external power supply to my UNO

author
IsaiasD made it!(author)2014-12-04

Hi,

I followed all the steps and instructions posted here and I couldn't burn the Atmega328, I got this "MCU 'atmega328' supported for assembler only- unknown MCU 'atmega328' specified". I'm using arduino IDE version 1.0.1 and arduino board R3. What can it be the problem?

author
3lwamakram100 made it!(author)2014-12-04

i did that with atmega328p-pu

but it didn't work on it there was an error althought the wiring diagram was right !!!

author
JohnN3 made it!(author)2014-11-17

How do you download the files in the article? Sorry for my ignorance but I can open the text and copy paste, (will that work)? how do I get the rar down?

author
I3L4ck5h33p made it!(author)2014-11-18

I use winrar but even still you should be able to download it and right click and extract the files. For the boards file I just opened the original selected all and pasted over everything from the Web page itself.

author
JohnN3 made it!(author)2014-11-19

Thanks for that, I did get it down by changing browsers from IE to Chrome. Usually right clicking on component would give a menu with option of downloading but in this case not. Chrome simply downloaded it. I am however seeing conflicting statements in articles regarding the process of installing the bootloader, One article on the Arduino.cc website says that it works with the Duemilanove, and won't work using the Uno. I wanted to use the method using the chips internal clock since I'm still waiting for the necessary capacitors to add the external. but now I'm not sure it will work....any insight would be appreciated.

author
I3L4ck5h33p made it!(author)2014-11-22

Sorry for the broken up/late reply to your question, but about the capacitors i'm going to take a shot in the dark. try using different value caps but as close as possible to the 22pF's. the crystal should be looking at them as in a series so i want to say by that each side is utilizing roughly 11pF (give or take) but keep in mind the probability of any stray capacitance (we'll just say around 9pF), I'm assuming the 22pF value was selected to take all that into account so it wouldn't be overwhemling nor being stingy with what it actually needs.

author
abel.maktub made it!(author)2014-10-22

Where can I find the two files which are attached (avrdude.config and boards.txt) ?

I can't find them.
author
I3L4ck5h33p made it!(author)2014-11-08

They're under the steps 1 - 9 on this page.

https://www.instructables.com/id/Burning-the-Bootloader-on-ATMega328-using-Arduino-/step4/Preparing-the-software/

author
JohnN3 made it!(author)2014-11-17

How do you get them down clean if I click on them they open. The rar being compressed is well compressed lol.

author
kaledawit made it!(author)2013-10-02

Hello
I need to burn the Atmega328p-pu with arduino uno r3, and arduino 1.0.5 IDE or 1.0.1 When i try to upload the Arduino ISP sketch, Error happen this is

avrdude: stk500_getsync(): not in sync: resp=0x00
please help me I follow the instruction in the above and other fourm

my email kaledawitesmelealembd(at)gmail,com

author
I3L4ck5h33p made it!(author)2014-11-08

I'm sure by now you have already figured something out but I'll post a reply any ways....

Make sure you selected "Arduino as ISP"

Make sure the files he provided overwrites the originals and try selecting board type as "Arduino UNO" (not 328).

Worked for me flawlessly using the R3 board and the same chip you mentioned.

author
mbose2 made it!(author)2014-11-12

My 328p-pu probably came with the bootloader, but on uploading sketch it says yikes! invalid device signature and double check connections.Even on burning bootloader it gives same error. plz help me sir. It's urgent.