Burning the Bootloader on ATMega328 Using Arduino UNO As ISP

507,346

491

134

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

  • Optics Contest

    Optics Contest
  • Make it Glow Contest 2018

    Make it Glow Contest 2018
  • Plastics Contest

    Plastics Contest

134 Discussions

0
None
slifer91

Tip 5 weeks 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
None
FarhatA2

6 months ago

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

0
None
sankeerthc

Question 6 months 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
1 more answer
0
None
acaosankeerthc

Answer 6 months ago

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

1
None
LOLB1

Question 8 months 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
1
None
LOLB1

Question 8 months 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.

0
None
DanielC845

Question 8 months ago

Can I do FTDI > ATmega328P > ATmega328P (target)?

0
None
Rohan Khairnar

11 months 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
None
Hardik Chauhan

11 months ago

Error

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

0
None
MohammadU18

1 year ago

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

2 replies
0
None
AnkitS139AnkitS139

Reply 11 months ago

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

0
None
AnkitS139

11 months ago

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

0
None
CliffG1

11 months ago

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!

0
None
RoOtZ1

11 months ago

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

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

22pFCeramic Capacitors}

0
None
MohammadU18

1 year ago

hurray its working

thanks a lot sir

0
None
ravindra12

1 year ago

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

0
None
Harish Gajjar

1 year ago

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

0
None
Harish Gajjar

1 year ago

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

thank you!!