Burning the Bootloader on ATMega328 Using Arduino UNO As ISP

569,992

506

146

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. 

5 People Made This Project!

Recommendations

  • Make it Glow Contest

    Make it Glow Contest
  • First Time Author Contest

    First Time Author Contest
  • PCB Challenge

    PCB Challenge

146 Discussions

0
jithinv4
jithinv4

6 months ago

Arduino: 1.8.13 (Windows 10), Board: "Arduino328"

Error while burning bootloader: missing 'bootloader.tool' configuration parameter.... this is what the error i have

0
trieuvuquan
trieuvuquan

Reply 5 weeks ago

I got the same error, did you find the cause and solution?

2
slifer91
slifer91

Tip 2 years ago

Thanks so much it was working finally. I tried like hundreds time earlier but it doesn't work. So if any of you failed, consider these troubleshooting tips:

1. USE the OLDER version of arduino (Arduino 1.0.1)

My first mistake. If you use latest version, it will resturn a lot of error to ask you to change the board configuration.

2. Check wiring.

Check for lose wiring and use multimeter to check connection. Sometimes the breadboard is too old.

3. Follow the wiring exactly as the author gives above.

I keep the same wiring configuration from other website cause i thought it is the same. totally wrong.

4. Do not mistaken "Arduino ISP" and "Arduino as ISP".

After countless failure you tend to make this mistake.

5. Make sure the Atmega you are using on the Arduino board to act as ISP is Atmega 328P-PU.

Somehow, it gives out error countless time. Find Arduino board that uses Atmega 328P-PU to program the Atmega 328 PU.

6. Keep calm and check that you do it correctly.

After countless failure, you tend to skip some part or do some steps wrongly especially the programmer selection (Arduino ISP vs Arduino as ISP).

It took me a week to finally succeed and I hope you guys can follow these troubleshooting tips.

7. If you mistakenly click upload instead of burning bootloader, disconnect arduino, close the program and reupload ArduinoISP program.

8. Check your MCU! This bootload instruction is for Atmega 328 U ONLY. For Atmega 328PU or Atmega 328P-PU select Arduino Uno instead of Arduino 328 at Tools>Board.

Cheers!

0
achandran4
achandran4

Reply 5 weeks ago

Almost gave up until I saw this. Thanks bro.

1
Shaikh Muhammad
Shaikh Muhammad

Question 1 year ago

The files at location C:/program files/Windows Apps are extremely protected and requires administrative permissions, how to do it?, please help, Thanks in advance

0
beverlyowino
beverlyowino

Answer 4 months ago

I'm also experiencing problems with permissions. Did you find a solution?

0
Shaikh Muhammad
Shaikh Muhammad

Reply 4 months ago

Yes, we do not have to make installation through setup file but download zip file that we can direct open application file after unzipping, thank you

0
Shaikh Muhammad
Shaikh Muhammad

7 months ago

I have made this, I can help anyone if need, this is latest comment written on 9th June, 2020, I don't want to be Extinct this post or method, thank you

1
super.nova.egy
super.nova.egy

Reply 6 months ago

can you help please?
I find these errors!!

0
Shaikh Muhammad
Shaikh Muhammad

Reply 6 months ago

how can I help you? what error are you getting?

1
noahger02
noahger02

11 months ago

I started from below zero! Having a daughter doing engineering diploma asking me tech questions, I decided to enroll at Instructables.com. Starting as a real dummy, I voraciously took in everything said/written and slowly started understanding basic things such as ATmega Microcontrollers, Arduino Programmer... Now, I feel equipped to delve deeper into giving a more technically useful hand in her project. I will be your guest for the foreseeable future and hope that you'll continue to welcome me!

Thanks a big bunch, Instructables.com!

0
ProteekB
ProteekB

1 year ago

Would like to thank the author for all the hard work done by him. I too wasted around three days trying to load the bootloader and could finally succeed using this instructable.

0
Rohan Khairnar
Rohan Khairnar

3 years ago

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.

0
Shaikh Muhammad
Shaikh Muhammad

Reply 1 year ago

It may be not programming problem as you are saying that after uploading code, it is hardware problem, thanks

1
LOLB1
LOLB1

Question 2 years ago

In step 5: In the tools menu and in the board list there is no
atmega328. But there's plenty more like arduino duemilanove w/
ATmega328, arduino nano w/ ATmega 328, arduino mini w/ ATmega 328, arduino BT w/ ATmega 328, Lilypad arduino w/ ATmega 328.

Screenshot (39).png
0
Shaikh Muhammad
Shaikh Muhammad

Answer 1 year ago

ATMEGA328P is a microcontroller and you have to choose board, thanks

0
FarhatA2
FarhatA2

2 years ago

manu08 thank you very much i use this with 3 Atmega328 and it is working good thank again <3 :* :*

0
sankeerthc
sankeerthc

Question 2 years ago

sir,i have an "ATMEGA328 U" IC instead of "ATMEGA328P-PU".icant burn bootloader in it it shows error message like as follows:

avrdude: Expected signature for ATmega328P is 1E 95 0F

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

Error while burning bootloader.

can you please help me with a solution.....please!

IMG_20180501_133038.jpgIMG_20180501_133146.jpg
0
acao
acao

Answer 2 years ago

It's because you have a different microprocessor. That chip requires different hex file so the arduino can understand it.

2
LOLB1
LOLB1

Question 2 years ago on Step 5

In step 5: In the tools menu and in the board list there is no
atmega328. But there's plenty more like arduino duemilanove w/
ATmega328, arduino nano w/ ATmega 328, arduino mini w/ ATmega 328, arduino BT w/ ATmega 328, Lilypad arduino w/ ATmega 328.