Picture of Bootload an ATmega328

This instructable adds to any of the Arduino on a Breadboard instructables. I wrote my own breadboard-Arduino tutorial, and then I found that I was struggling to program some of the boards I made. A lot of research and dead-ends got me understanding that:

1. You either need a microcontroller with a pre-loaded Bootloader, or must load your own
2. Not all ATmega328’s are equal

(A bootloader, very simply, is a programme that sits on the chip and manages the upload of your sketches onto the chip)

There are plenty of bootloading resources, but I couldn’t find a single one that pulled everything together in a way that made sense to me.

If this instructable helped you, please visit Crash Bang Prototyping, follow us on twitter, and join in with our prototyping resources and tools.

Here goes…

Remove these adsRemove these ads by Signing Up

Step 1: Parts

1 x Arduino on a Breadboard
1 x Arduino UNO
Connecting Wires
Arduino IDE installed on your PC

Step 2: The Approach

Picture of The Approach

We’re going to use the Arduino UNO to bootload the ATmega328 that is sitting on the Arduino-on-a-Breadboard. This is fairly straightforward if you have an ATmega328P-PU, but needs an extra step for an ATmega328-PU. I’ll tackle the differences later in the Instructable.

Step 3: Program your Arduino UNO as an ISP

Picture of Program your Arduino UNO as an ISP

We need to program the Arduino UNO to act as a an ISP (In-System Programmer), so that it can burn the bootloader onto the Breadboard chip.

  1. Open the Arduino IDE
  2. Open the ArduinoISP sketch (under File, Examples)
  3. If you’re using version 1.0 of the IDE:

search for void heartbeatand change the line that reads:




Connect your UNO to the PC, making sure it’s not connected to the Arduino on a Breadboard.

Ensure your UNO is selected under the Boards menu option, and upload the sketch.

1-40 of 42Next »
bhutanidivye7 months ago

Thanks a lot

gewkwn8 months ago

thanks for info !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

kylebarker828 months ago


AndyTallack (author)  kylebarker828 months ago
Great stuff - thanks for letting me know! Would love it if you followed Crash-Bang on Twitter as a thanks :)
Thanks for this. Helped me save a wasted ATmega328
AndyTallack (author)  Antzy Carmasaic9 months ago
Excellent, pleased it helped! Thanks for letting me know.
ShajeehM40 minutes ago

can we bootload atmega 8 using the same procedure

tsaltzman25 days ago

Thanks! Fixed my problem. :)

b33ma24728 days ago
I'm getting error 0x01e 0x96 0x14

I'm trying to boot load the 328-PU chip (on breadboard) with 328P-PU chip in uno r3

Have programmed uno (atmega328p-pu) as ISP bootloader

have changed hex value to 14 in avrdude.conf

Just get error on bootloading?
AndyTallack (author)  b33ma24726 days ago
Can you send the full error message?
Did you restart the Arduino IDE after you edited the avrdude.conf?

ShreyasD11 month ago

Thanks !!

it worked at last

digonto.GL1 month ago

this really helped me a lot man . thanks a lot and briliant work boss

raja_sekharan4 months ago

Thank you, for the clear instructable. Keep up the good work !

nandan31015 months ago

Hey I tried a lot but it's not working I don't know why I have exactly followed your steps as you said then also it is showing me error again and again

Yikes! Invalid device signature.

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


AndyTallack (author)  nandan31015 months ago

Hi. Can you check which ATmega chip you are using?

kylebarker828 months ago

Should we still use a 16MHz Crystal for pin 9 and 10???

AndyTallack (author)  kylebarker828 months ago
Yep, I use a 16MHz crystal. In the next few months I'll be working on an instructable for using other crystals - speed vs power and any complications like uploading sketches etc.
rohith99910 months ago
hiii andy i have successfully bootloaded atmegaP-PU chip using ur tutorial now i want to upload a blink sketch to test it later i want to reflash this chip using pulse sensor sketch using arduino uno tx and rx pins without using FTDI and after thant i want to remove tx and rx pins from arduino and i just want to power up using battery will the sketches run ?
all i want to know this because i am preparing beetband sleeve from the make magzine could you please help me regarding this

AndyTallack (author) 1 year ago
Great, thanks for the link.  Why don't you put it into a full-blown instructable, so that everyone can search for it more easily?

A suggestion - I prefer the hardware files from :

I haven't looked into it in detail, but this seems to offer greater language support - eg. Serial (which the GIThib  version doesn't support)...

pctj1011 year ago
nugrahadi1 year ago
the resistor above the led, does it connect to the ground or 5V?
AndyTallack (author)  nugrahadi1 year ago
It connects to GND - sorry the diagram isn't very clear. If you trace the other leg of the LED you'll see it connects to pin 13 on the Arduino, which provides a +ve source.
Hi Andy,
I have tried your steps but I get an error message - "avrdude: stk500_getsync(): not in sync: resp=0x00"
I also have one more question for you, in the schematic, there is a capacitor connected to pin 1 but the other end of it is not connected to anything at all. What is the value of that cap and where should the other end of it be connected to?
Also I would like to ask you for another help. I have some 328 PU chips that came with preinstalled bootloader and the blink sketch uploaded. when I remove the stock 328P-PU from my Uno Rev3 and install the 328PU, I am not able to upload any sketch. All it does is blinks LED13. I get the signature error. I have tried changing the signature but still I cant get it to upload any new sketch. The IDE version is "arduino-1.0.2"
Please help
AndyTallack (author)  edifiedsprit1 year ago

I battled with the not in sync error, and if I recall correctly it was linked to that capacitor that isn't connected... although it shouldn't be needed for burning the bootloader, only when uploading the sketches. When are you getting this error, when burning or uploading?

The capacitor incidentally is a 0.1uF - I should have left it off the diagram as I only used it when connected an FTDI board to upload sketches.

On the 328-PU chips: I haven't actually tried them with a preinstalled bootloader, but once I'd burned the bootloader using the method in this instructable I was able to upload sketches without changing the signature. Did you try burning a new bootloader with one of these chips?

If you could send me a list of the steps you followed I may be able to help a little more.

Info: The chips I bought from eBay are 328-PU. It came with Arduino Bootloader and blink sketch already uploaded. So if I remove the stock 328P-PU from my Uno-R3 and insert the 328-PU, I can see the blinking LED on Pin 13. The supplier did not mention what bootloader is installed.The link is here:

Steps that I had followed to Burn a bootloader to the new 328PU chips:

Step 1: I setup a 328-PU on a breadboard as per your circuit diagram. I did not connect the 0.1uF capacitor to pin 1 on the target 328-PU.

Step 2: I connected wires from breadboard to Uno-R3.

Step 3: I edited the avrdude.config file and change the signature as instructed in your instructable, then saved the file and close the folder.

Step 4: I connected Uno-R3 to my laptop and open the IDE (version arduino-1.0.1)

Step 5: In the IDE I went to tools and ensured that the selected board is UNO, Then I went to "Programmer" and selected "Arduino as ISP".

Step 6: I clicked on Burn Bootloader.

Here I get stuck. and I am not able to go any further from here
Issue 2:

Dear Andy,
My motive is to be able to program (upload new sketches to) the new 328PU chips that I had bought. The reason why I bought those chips is because they came with preinstalled Arduino bootloaders, hence I thought that I would be able to upload sketches onto them just by swapping them with the stock 328 P-PU on UNO-R3.
Sadly I am stuck even here. If I remove the stock 328P-PU from my UNO and insert this 328P-PU, I cant upload any sketches to them. I have tried to upload after changing the signature file, but still I get the same error.

Please provide me with a solution to either issue 1 or issue 2. If I am not asking for too much, then provide solution to both the issues :-)

Thanks a ton in advance...

AndyTallack (author)  edifiedsprit1 year ago

Just checking - the chips on the link you provided were ATMEGA8 chips, not ATMEGA328. Can you confirm that they are ATMega328?

Secondly, perhaps you could send me the error that the IDE shows - do you have Verbose Output set (File, Preferences, Show Verbose Output during upload).

Well, I am really sorry for wasting your time here..:-(. Yes I was wrong. The chip is a ATMega8-16PU.

What can I do with this?? Can I still upload sketches on them by any method?? :-P

AndyTallack (author)  edifiedsprit1 year ago
No worries. Sorry I don't know much about the ATmega8 - it is in fact an older chip used on the early versions of the Arduino - it has less memory, less PWM pins etc. than the ATmega328. To upload sketches, I suggest you try the "Arduino NG or older w/ ATmega8" option from the "Tools/Board" menu in the IDE.

Good luck!
Dear Andy,
I just found that I had to update the boards.txt file with this
" ############################################################## Optiboot-Atmega8-16
I am now able to upload sketches once I change the selected board as created by this code.
mspinks1 year ago
hmm. I just ordered some chips and realized I confused the 328-PU for the 328P-PU. What about the "use -F to override this check" Shouldn't there be a way to just put the -F flag in the command automatically? Or I suppose I could do it from the command line every time.
AndyTallack (author)  mspinks1 year ago
Yes, you could do it from the command line but the command line involves a host of parameters and if I recall binary files that you need to specify. For the more technically challenged I must admit I was a little lazy and went with a bit of a "cheat" solution. Let me know if you win with the command line...
gordonpt1 year ago
it works for me! I used Uno r2 IDE 1.01!
Thank you
Can you just copy lines 7261-7447 (ATmega328P description), paste them right underneath and change the code to the ATmega328 signature?
I tried it and I wasn't able to get it to work, even by adding a new board. It ultimately didn't matter though because once you bootload the 328 once, the computer seems to recognize it as an Arduino Uno. I found that you could just change the avrdude.conf file back to normal and still be able to upload to the 328 chip.
AndyTallack (author)  lozervillesuks1 year ago

I don't think that would work, as when we bootload we are telling the Arduino IDE that we're bootloading an Arduino UNO, which comes with a 328P. You'd probably need to create a new board to appear in the IDE and then link that to the definition for the 328.
Sorry I'm traveling so not able to go through all the steps. Did you try it? Any luck?

manu081 year ago
Now I got the following

avrdude: Expected signature for ATMEGA328P is 1E 95 14
Double check chip, or use -F to override this check. xD
AndyTallack (author)  manu081 year ago
Hi Are you sure that the chip you're bootloading is a ATMEGA328? The ones that I've worked with have a signature of 1E 95 14.

Do you get a message like this, which will tell you what your device signature is? I've highlighted it in bold
avrdude: Device signature = 0x1e9514
avrdude: Expected signature for ATMEGA328P is 1E 95 0F Double check chip, or use -F to override this check.

If so, try using this signature as the replacement in the avrdude.conf file?  Just make sure that you do have an ATMEGA328, as I don't know what will happen if you try to upload the wrong bootloader... potential toast?

If you don't see a message like the one above, try turning on detailed messages. In the Arduino IDE click on:
- File
- Preferences
- "Show Verbose Output during Upload"

Hope the above helps?

I tried with Atmega6-16PU. Tried to optiboot. But got this error "avrdude: Yikes! Invalid device signature.
Double check connections and try again, or use -F to override
this check."

please help..
Can you upload set by step for boot loading Atmega8 .. Using uno board..

As the error says, you can use the F key to upload to the chip anyway. The problem is that the returned signature is probably all zeros, but whatever it is, the Arduino IDE doesn't like it.
AndyTallack (author)  ajdragornlord2 years ago

Sorry, I don't have an Atmega8 to try out - and not sure of the variants that there are... so not sure how the Arduino IDE supports this. If the IDE doesn't support it, then you'll likely need to start using the command-line version of AVRDUDE, or even give in and buy Atmel's programmer.

Start with the below tutorial, and try to take it from there.:

If no joy then suggest you google yourself to death to try to piece it all together.

1-40 of 42Next »