Bootloading and programming a Atmega328P/PU using arduino Nano or Uno as ISP

Facebooktwittergoogle_plusredditpinterestmail

I recently bought a few Atmega328PU chips to use in some project. Its better to use these bare ICs in the circuits instead of putting the whole Arduino Uno  or Nano board, as their cost is higher. But the problem with bare Atmega328 ICs is that usually there is no bootloader installed in them and you need a saperate programmer to program them before you put them in your circuits.

Arduino’s official website shows this easy way of using Arduino Uno as a programmer for the Atmega328 IC, but what if I have an Arduino Nano?You need to modify this circuit a little to work with a Nano.

Here’s the circuit for Arduino Nano as programmer:Circuit Diagram for Arduino Nano As ISP Programmer and Bootloader

Circuit Diagram for Arduino Nano As ISP Programmer and Bootloader

PDF File for the Circuit Diagram can be found here

Once you have built this circuit, you are ready to burn a bootloader or burn a sketch to an Atmega328PU or P.

First install a stable version of latest Arduino IDE from here.

Burning a bootloader to Atmega328.

  1. Open Arduino IDE
  2. Click on Tools => Board => Arduino Nano w/ Atmega328Burn BootLoader Atmega328 using Arduino Nano
  3. Now click on Tools => Programmer => Arduino as ISPArduino Nano As ISP bootloader
  4. Connect the Circuit to the Computer using USB cable.
  5. Click on Tools => click Burn BootloaderArduino nano As ISP bootloader

 

Burning a sketch to Atmega328. 

  1. Open Arduino IDE
  2. Click on Tools => Board => Arduino Nano w/ Atmega328. (i.e. Confirm Correct board is selected.)
  3. Now click on Tools => Programmer => Arduino as ISP. (i.e. Confirm Arduino as ISP is selected.)
  4. Now copy paste or write the sketch in the programming window.  You can also copy a downloaded sketch to the sketch directory.  On windows its located at C:Users*username*DocumentsArduino Make sure you put each sketch in a specific directory.  This way in Arduino IDE you can directly go to File =>Sketchbook => Select the sketch you want to burn.
  5. Once you have written/copy pasted or selected the sketch click on Sketch => Verify/Compile.Burn Sketch Atmega328p using Arduino Nano
  6. Now select File => Upload using ProgrammerBurn Sketch Atmega328pu using Arduino Nano

Once the Sketch is burnt to your IC, you are all set to use this chip in your circuits.  Let me know if you get any issues or there are any suggestions you want to make to improve this post.  You can leave your comments below!

Amogh Desai

Amogh Desai

A System Admin by profession, is a tech buff and a licensed Amateur Radio operator with callsign VU3DES. He is interested in Technology, Amateur radio, Electronics home-brewing, FOSS, Photography and everything tech. He uses this blog to share his views and ideas with people sharing similar interests.
Amogh Desai
Facebooktwittergoogle_plusrssyoutube

Leave a Reply

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