one question is, when we check Mega's schematic,
we can check Atmega8U2 chip that for support usb uploading.
so then if i make my diy board and using "SPI" port to write down do i need this chip?
-> i have dc-dc converter to supply ext 5V for atmega 2560
and the other question is
my DIY board need bootloader to operating "ino" file
so, it can be possible to upload both files at once to empty chip?
both files means -> one is mega's bootloader.hex and the other file is fw.hex that come form export by arduino IDE
becaous of this two question, i can not finish my schematic job
please help,
No, you don't need the TTL-to-USB converter if you only want to upload via ICSP (SPI port). You however need it if you want to communicate with a PC over USB (upload over USB or serial prints in your code), but that does not necessarily have to be on the board (there are external adapters that you can use).
I do what you’re doing every day with a MEGA-1284 board.
I compile normally, save the hex.
I do support the boot loader and serial I/o but it’s off board.
Later, I use avrdude to flash new, empty boards, and away they go.
If I do need the serial upload, I add optiboot to the image and that gets flashed along with the hex when needed.
One pass / easy every time.
If I’m pushing out a few boards, use a JTAG ICE (ISP programmer) faster, and boot loader not necessary.