Go Down

Topic: bootloading mega328 using arduino mega2560 as ISP (Read 3651 times) previous topic - next topic

frozenfire_981

Sep 09, 2013, 07:24 am Last Edit: Sep 09, 2013, 07:29 am by frozenfire_981 Reason: 1
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 :)

spycatcher2k

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)
Drew.
http://www.uk-pcb.co.uk - My UK Based PCB Fab & Assembly Company
Design work undertaken
SMD & Thru-Hole assembly

oric_dan

#2
Sep 09, 2013, 11:42 pm Last Edit: Sep 09, 2013, 11:43 pm by oric_dan Reason: 1
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 .

uxmanz

"maharbani,..
ap nay bohat karam farmaya hai hamari zat per,.. " ~ 8)


thanks man!!,..

Go Up