Burning the Bootloader on ATMega328 Using Arduino UNO As ISP

495,059

491

128

Published

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. 

4 People Made This Project!

Recommendations

  • Casting Contest

    Casting Contest
  • Woodworking Contest

    Woodworking Contest
  • Make it Move Contest

    Make it Move Contest
user

We have a be nice policy.
Please be positive and constructive.

Tips

4 Questions

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

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

1

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

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.

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

128 Comments

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

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.

Error

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

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

2 replies

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

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

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!

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

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

22pFCeramic Capacitors}

hurray its working

thanks a lot sir

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

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

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

thank you!!

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

1 reply

Yes sir, you are correct.

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.

hi.i am mahdi.

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

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

Can any one help?.

Error while burning bootloader. I am using 1.6.5 version.