2015/07/23

Burning Sketch To Atmega328P-PU On A Breadboard Using Arduino Uno As Programmer

This is a quick summary of how to burn sketch to Atmega328P-PU on a breadboard using Arduino Uno as programmer.

Wiring Diagram



Setting Up Arduino Uno Board As Programmer

Please refer to my previous post Burning Arduino Uno Bootloader to Blank Atmega328P-PU using Arduino Uno as ISP on how to setup the board (loading the ArduinoISP sketch to Arduino IDE, setting the correct Arduino board type, uploading the compiled Arduino ISP sketch to the board).

Preparing The Sketch To Be Written Into Atmega328P-PU On The Breadboard

We will be using the Blink sketch that comes with the Arduino IDE as the example for this post.

First, load the Blink sketch into Arduino IDE.


Second, select the board type for the Atmega328P-PU on the breadboard. Because the Atmega328P-PU is loaded with Arduino Uno bootloader (see my previous post Burning Arduino Uno Bootloader to Blank Atmega328P-PU using Arduino Uno as ISP), "Arduino Uno" is selected as the board type.


Third, select "Arduino as ISP" as we will be using Arduino Uno as the programmer.


Fourth, select "Upload Using Programmer". This will compile and upload the sketch to the Atmega328P-PU on the breadboard.


Fifth, check the Text Console for any error message.


If all goes well, the LED attached to Pin 19 of Atmega328P-PU (Pin 13 of Arduino Uno) will start flashing immediately after the upload is completed.


Reference:
http://blog.biophysengr.net/2012/06/writing-sketches-to-atmega386p-pre.html
http://electronics.stackexchange.com/questions/67000/i-burnt-a-pin-now-what-do-i-do

2 comments:

  1. This blog awesome and i learn a lot about programming from here.The best thing about this blog is that you doing from beginning to experts level.

    Love from Pprogramming

    ReplyDelete