Thursday, November 26, 2015

Arduino Uno Atmega328

To make this system I have a old arduino diecimila and some new Atmega328p-pu chips and I bought it without boot loader to save the money.
  
Then we are going to search the blog to see if I can burn the boot loader to the chips but it’s not work.   
To solder the pins with Arduino diecimila we have many ways to do this but there is problem that I have only one Arduino so I don’t want to change my board.


Arduino uno Atmega328

Open sketch ArduinoISP and setup wires

Firstly I open the Arduino SP sketch so that I can check it.then we found some blogs which have missed one link connecting pin 10 of arduino to pin 1 of atmega328P.When I connect this that everything work perfectly.

 First column refers to Arduino Diecimila, second column refers to pin of Atmega328p
Pin 10 -> pin 1 
Pins 13, 12, 11 -> pins 19, 18, 17
Pins 10 -> pin 1
Vcc -> pins 7, 20
Gnd -> pins 8, 22

And connecting crystal and capacitors to Atmega328p
Crystal 16Mhz -> pins 9, 10
Capacitor 22pf -> pins 8,9
Capacitor 22pf -> pins 8, 10

Arduino uno Atmega328
Arduino uno Atmega328

Arduino uno Atmega328



















How To  Upload ArduionISP program and start burnning bootloader.

We are going to know about the arduino diecimila with Atmega 168p and then we burn Arduino UNO to my atmega 328p.

First upload program to set my Diecimila as ArduioISP

1. Select Tools -> Board -> Arduion Diecimila

2. Select Tools -> Programmer -> AVR ISP

3. Compile then upload the ArduinoISP sketch. You should see "Done upload"

4. Now select Tools-> Board -> Arduino UNO

5. Select Tools -> Progammer -> Arduino as ISP

6. Click Burn Boot loader. In a minute you should see "Done burning bootloader"

If you are smart you can easily reached step 6 within 1 min. To burn a second Atmega328p, unplug USB cable, swap a new one in your breadboard after that plug the cable and run 6 step again.
If this process doesnot work properly then checks the wiring and follow all  steps again.

Arduino uno Atmega328
Arduino uno Atmega328



















Step 3: How to Test bootloaded Atmega328p


To test that Atmega 328p is working with boot loader or not, I simply swap  it with my at mega 168 on my ardino diecimila then follow some procedures:
 load the Blink program. Change the LED turn on and off duration so you know this is your unique program when running in atmega328p after upload.
From Arduino IDE, select Tools -> Board -> Arduino UNO

 Select Tools ->Programmer -> AVR ISP
Plug in a LED to GND and pin 13 of your Arduino  Swap Atemega168 with Atmega328p. Careful when you unplug the chip. More gentle less chance of damaging the chip. I used two needles to help unplug the chip :).

Plug the Arduino back to your computer. Make sure you hear a beep that computer confirms recognize you board
 Upload. Then you should see LED blink in the way you set in step 1.
If this process does not work properly to check the step 2.
To test the at mega 328p we can repeat the step5-8.
Arduino uno Atmega328
Arduino uno Atmega328
Arduino uno Atmega328

No comments:

Post a Comment