Instructables

Burning the Bootloader on ATMega328 using Arduino UNO as ISP

Featured
Picture of Burning the Bootloader on ATMega328 using Arduino UNO as ISP
DSC_0007.jpg
ChipPU.png
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. 


 
Remove these adsRemove these ads by Signing Up

Step 1: Materials

Picture of Materials
DSC_0018.jpg
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


1-40 of 59Next »
lizcueyesterday

Where are the attachments?

jannetta made it!20 days ago

Mine worked perfectly!

20141002_115157.jpg

Where did you find the attachments??

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

I can't find them.

Maybe anybody mentioned this before but I will write again. I had to change MISO -MOSI pins to burn bootloader. I use MISO=12 , MOSI=11. If anybody can't burn, try this pin numbers. I use ARDUINO UNO as a bootloader, and 328P (smd)

Thank you for this sharing. It saved my day!

asdf

im using arduino 1.0.5 (i know u said its better to use 1.0.1)and im getting the error:"use -F to override this check" .... what does it mean and how to solve it ?

computeras229 days ago

it works with atmega 324 ????

kaledawit1 year ago
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

maybe you connect wrong the voltage or your chip broken

did u get any solution..??

computeras229 days ago

THANKS A LOT!!!!!!!!!!!! YOU SAVE ME !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

fmfootball382 months ago

Excellent! I guess I made the same mistake as you in buying without the p! This instructable is just what I needed! I assume that when you move the newly burned micro to its final resting place you need to bring the crystal and capacitors with it, right?

TAPAN MOJIDRA2 months ago

Hello

I need to burn bootloader to the P89v51rd2 (8051) microcontroller i have hex file and arduino if i use arduino board and same configuration as in this circuit as MOSI, MISO, SCK to the 8051 but what should be the crystal frequency ?
please reply me

mario87054 months ago

Thank you! Now i've two Arduino!

adityapvarma5 months ago

Thank you!!

Worked Perfectly..!!!

adityapvarma5 months ago
adityapvarma5 months ago
rohinrohin1 year ago
Hey! First of all, Brilliant Tut! :D Llove it..
So, does this work on the ATmega328p-pu also?
i just need to follow the same steps? as i had bought thep-pu and didn't know to burn it!
any help would be appreciated! :D
Thank you!

Yes it works on ATmega328p-pu also but you have to choose arduino uno as board. I tried and confirmed.

Thanks, that was quick lol xD

hahaha,, after 1 year at last!!! well very nice instructions .

EvrttGrn1 year ago
Andrut1291 - If you're still trying to figure it out, I used this tutorial using my uno r3 and Atmega328p-pu. "http://arduino.cc/en/Tutorial/ArduinoToBreadboard"

Manu08 - Thank you for posting this even though it didn't work for me.
KalkiV EvrttGrn8 months ago

Thanks EvrttGrn ;-)

Arpan21038 months ago

it is not working..

it shows an error..

avrdude: Yikes! Invalid device signature.

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

this check.

Phimo8 months ago

I have been playing with Atmega328s as well and I have put together a web page on how to use an Arduino Uno as an ISP with a modified ArduinoISP sketch.

It's still in its infancy but I welcome comment and if it helps, thanks are always appreciated :o)

www.lydiard.plus.com/arduinoisp.htm

arduino958 months ago
Where can I find the two files which are attached (avrdude.config and boards.txt) ?
I can't find them.
semihmasat9 months ago
Ok, thank for the instructions.

But lets say we did that. After this steps how can we upload our sketches to our new cheapy-arduino ?

I am also trying to do the same! Please help

ender323 ndshah888 months ago

Just to make sure you get a notification, I've answered this above.

There is a way to do that with an Arduino, but the easiest and cheapest way is to use an FTDI breakout board. I got one on Sparkfun for $15. Just plug it in (DTR to RST, VCC to +5V, GND to GND, TX to RX, and RX to TX) and if the bootloader is installed properly it will allow you to upload sketches over the USB port on the breakout board.

ndshah889 months ago

I am also trying to load my sketch on to this Arduino328. Can you suggest how to go about that?

Tlaltecutli9 months ago
Could you tell me where to find the two files you share to replace in the arduino folder??
steinie449 months ago

Why not remove the chip from the Uno and replace it with the new one. Then burn it.

mrdragon33310 months ago
I get this error : avrdude: stk500_getsync(): not in sync: resp=0x00
any idea what could be wrong ?
manu08 (author)  mrdragon33310 months ago
If using the arduino version 1.0.5 try removing the capacitor.
johnybody10 months ago
I had to switch MOSI to MISO and MISO to MOSI to get it working...
gadgets_guy11 months ago
Can you tell me if this would work with ATMEGA328-PN and ATMEGA168-20PU chips?
dineshb9881 year ago
Hello....
I'm using arduino 1.0.5.
So which one is use from board???
can i use Arduino BT w/ ATmega 328?
Thank you
1-40 of 59Next »