Pages: [1]   Go Down
Author Topic: bootloading mega328 using arduino mega2560 as ISP  (Read 3161 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i had problems in bootloading and uploading sketches to atmega 328 using mega2560...
searched for guidance but could not finally find a final verdict on that.

in the end i successfully bootloaded and programmed atmega328P using mega 2560

here is what i did.

connections ::
arduino mega2560 :: mega328P
                      51 :: 17
                      50 :: 18
                      52 :: 19
                      53 :: 1
5V at pin 22, GND 20
1K resistor between pin 1 of mega 328 and gnd

16 MHz crystal at 9 and 10, 02 22pF capacitors between pin 9 & 10 and GND.

BURNING BOOTLOADER

1. upload the ISP sketch to arduino2560, having the following selections in tools tab..
   board : mega2560
   proagrammer: AVRISPmkII
   serial port: as required
   on pressing the upload button sketch will be uploaded
2. now place a 100uF capacitor between RESET and GND pins on arduino2560 with +ve side at RESET.
   make the followiong selections in tools tab...
   board : mega328 with 16MHz,5V
   programmer : arduino as ISP
   port : same
  
   now click burn bootloader... the boot loader will be burned without any error.

UPLOADING SKETCH

1. for uploading the sketch keep the settings unchanged as:
   board : mega328 with 16MHz,5V
   programmer : arduino as ISP
   port : same
2. open sketch i.e blink LED
   connect an LED with resistor at PIN 14 on atmega328 micro controller
   change the LED pin to 8 in the sketch
   goto file tab and select "upload using programmer" option.

   the sketch will be uploaded successfully and LED will start blinking.

use the schemetic diagram of arduino UNO for setting the correct corresponding PINS of mega328
here http://arduino.cc/en/uploads/Main/Arduino_Uno_Rev3-schematic.pdf

Any sketch will be uploaded using the procedure described above smiley
« Last Edit: September 09, 2013, 12:29:38 am by frozenfire_981 » Logged

Scotland
Offline Offline
Edison Member
*
Karma: 26
Posts: 1338
Have you had your Arduino fix today?
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

arduino mega2560 :: mega328P
                      51 :: 17
                      50 :: 18
                      52 :: 19
                      53 :: 1
5V at pin 22, GND 20
1K resistor between pin 1 of mega 328 and gnd    <-- this should be 1K-10K of the 328 and 5V (if its to ground its always in reset)
Logged

Drew.
http://www.uk-pcb.co.uk - My UK Based PCB Fab & Assembly Company
Design work undertaken
SMD & Thru-Hole assembly

the land of sun+snow
Offline Offline
Faraday Member
**
Karma: 159
Posts: 2916
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
i had problems in bootloading and uploading sketches to atmega 328 using mega2560...
searched for guidance but could not finally find a final verdict on that.
The information is all online, the problem is in finding the correct sequence of mouse clicks to run it down,

1. homepage:   http://arduino.cc/en/ -->
2. Learning;     http://arduino.cc/en/Tutorial/HomePage -->
3. scroll to bottom -->
4. Arduino as ISP Programmer:   http://arduino.cc/en/Tutorial/ArduinoISP -->
5. scroll to bottom --> 10K "pullup" to 5V on pin 1.

Then, for the Mega2560 board, you have to track down the correct SPI pins, as you did .
« Last Edit: September 09, 2013, 04:43:54 pm by oric_dan » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

"maharbani,..
ap nay bohat karam farmaya hai hamari zat per,.. " ~ smiley-cool


thanks man!!,..
Logged

Pages: [1]   Go Up
Jump to: