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.
- 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
- 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.
- for uploading the sketch keep the settings unchanged as: board : mega328 with 16MHz,5V programmer : arduino as ISP port : same
- 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 :)