how can i put programs to Atmega328P whith mega 2560

so ive searching for a way to put my programs to an Atmega328P bootloadet for duemilanove how do i put my programs down to my stand alone chip from mega 2560

If your chip already has a bootloader, the simplest way is this:

(1) Connect the reset pin of the Arduino Mega to ground. (2) Connect the TX pin of the mega to the TX pin of the 328p (3) Connect the RX pin of the mega to the RX pin of the 328p (4) Download programs as you would normally (select Duemilanove as the board, and the serial port of the mega).