http://arduino.cc/en/Tutorial/ArduinoISP
This procedure allows using a working arduino to program the bootloader of another ATMega chip using SPI as ICSP. It saves you having to purchase another peripheral (such as USBTinyISP).
Arduino as ISP relies on the SPI bus to transact the communications. On an older 168/328 the SPI bus is on pins 10 11 12 13. On a Mega(1280/2560) the SPI bus is moved over to the 50 51 52 53 pins!
I fought and fought and fought with the darn thing until I realized I had it wired incorrectly.
Thankfully, it's all translated in the ISP Sketch -
Slave reset - destination pin 'reset', connect to source 53
MOSI - destination pin 11, connect to source 51
MISO - destination pin 12, connect to source 50
SCK - destination pin 13, connect to source 52
Using Arduino 1.0 IDE write the arduino isp sketch (in examples) to the Mega, then change the board settings to the target (in my case dumilenove with 328) and com port stays the same.
burn bootloader, and tada!
































Visit Our Store »
Go Pro Today »




It should work with an uno (328p) and mega; make sure you have the pin numbers correct, as well as power and ground. Also, make sure the arduino environment is set for the mega to program the mega sketch, then the uno to burn the bootloader.
John Caza