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
This blog is for keeping my study notes, sharing knowledge and showing the products of my study.. I welcome your feedback...
Showing posts with label Atmega328P-PU. Show all posts
Showing posts with label Atmega328P-PU. Show all posts
2015/07/23
2015/07/20
Burning Arduino Uno Bootloader to Blank Atmega328P-PU using Arduino Uno as ISP
This is a quick summary of how to burn Arduino Uno bootloader to a blank Atmega328P-PU using Arduino Uno as ISP.
The Environment:
Arduino IDE: Version 1.6.5
Make sure to turn on Show verbose output during compilation and upload. This will greatly help us to understand what's going on during these 2 stages.
The Connections:
Note: The 2 capacitors next to the 16MHz crystal cannot be 100nF (it won't work).
Loading ArduinoISP sketch into Arduino Uno
Make sure the type of the board that will be running Arduino ISP is correctly set (in this case, Arduino Uno). Also, make sure the COM port is correctly set (in this case, COM10).
Compile and upload the sketch to Arduino Uno.
After the sketch is successfully compiled and uploaded, the message in the Text Console will look like the one below.
The whole configuration will be looking like the photo below. On the breadboard, the LED to the left is the heartbeat indicator.
Note, In the photo above, there is a 10uF capacitor connected between pin 1 (RESET) of the blank Atmega328P-PU and GND. This capacitor can be removed and it won't affect the burning of the bootloader.
Burning Bootloader to Blank Atmega328P-PU:
1. Select the type of the target board where the bootloader will be written to:
Since we want to burn Arduino Uno bootloader to the blank Atmega328P-PU on the breadboard, we need to select Arduino Uno.
2. To use Arduino Uno as the ISP, select Arduino as ISP.
3. Select "Burn Bootloader" to start the burning process.
During the burning process, the programming LED (the one to the right) will flash several time.
Note that in the above photo, there is no capacitor connecting pin 1 (RESET) of the blank Atmega328P-PU to GND.
After the process is successfully complected, the Text Console output will look like the one below.
That's it. The blank Atmega328P-PU now has Arduino Uno bootloader in it and is ready for projects.
References:
- http://forum.arduino.cc/index.php?topic=61776.0
- http://forum.arduino.cc/index.php?topic=310277.0
- http://www.instructables.com/id/A-solution-to-avrdude-stk500getsync-not-in-syn/
- http://www.avrfreaks.net/forum/does-device-signature-0x000000-mean-atmega-bad
The Environment:
Arduino IDE: Version 1.6.5
Make sure to turn on Show verbose output during compilation and upload. This will greatly help us to understand what's going on during these 2 stages.
The Connections:
Note: The 2 capacitors next to the 16MHz crystal cannot be 100nF (it won't work).
Loading ArduinoISP sketch into Arduino Uno
Make sure the type of the board that will be running Arduino ISP is correctly set (in this case, Arduino Uno). Also, make sure the COM port is correctly set (in this case, COM10).
Compile and upload the sketch to Arduino Uno.
After the sketch is successfully compiled and uploaded, the message in the Text Console will look like the one below.
The whole configuration will be looking like the photo below. On the breadboard, the LED to the left is the heartbeat indicator.
Note, In the photo above, there is a 10uF capacitor connected between pin 1 (RESET) of the blank Atmega328P-PU and GND. This capacitor can be removed and it won't affect the burning of the bootloader.
Burning Bootloader to Blank Atmega328P-PU:
1. Select the type of the target board where the bootloader will be written to:
Since we want to burn Arduino Uno bootloader to the blank Atmega328P-PU on the breadboard, we need to select Arduino Uno.
2. To use Arduino Uno as the ISP, select Arduino as ISP.
3. Select "Burn Bootloader" to start the burning process.
During the burning process, the programming LED (the one to the right) will flash several time.
Note that in the above photo, there is no capacitor connecting pin 1 (RESET) of the blank Atmega328P-PU to GND.
After the process is successfully complected, the Text Console output will look like the one below.
That's it. The blank Atmega328P-PU now has Arduino Uno bootloader in it and is ready for projects.
References:
- http://forum.arduino.cc/index.php?topic=61776.0
- http://forum.arduino.cc/index.php?topic=310277.0
- http://www.instructables.com/id/A-solution-to-avrdude-stk500getsync-not-in-syn/
- http://www.avrfreaks.net/forum/does-device-signature-0x000000-mean-atmega-bad
Subscribe to:
Posts (Atom)