Burning the Bootloader on ATMega328 using Arduino UNO as ISP

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:
Arduino Bootloader
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 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
Arduino Bootloader connections
… 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.

Major Components in Project
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

 

For more detail: Burning the Bootloader on ATMega328 using Arduino UNO as ISP


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top