Again, tried to upload code onto my MCU via USB, but Timeout Error.
The weird thing is, I have also tried uploading code via the third link and it was successful. If it can upload code directly onto the MCU, I'm not sure why it would not be able to upload the bootloader.
I'm not sure if it has to do with the fuses, lock bits, oscillator, etc.
correct HW: 30pF caps on oscillators is little bit more but maybe it works; I suppose it is OK as you was able to upload FW etc.
correct FW in 16U2; make sure it works correctly - Rx, Tx and DTR must pass to the 2560 (Tx, Rx and RESET); BTW: R16 1k is for what ???, the best way how to check it is loopback test for Rx,Tx and RESET with some LED or DMM (if you are lack of advanced measuring devices).
Mega need the bootloader; if you are using IDE, you need not care about fuses
correct HW: 30pF caps on oscillators is little bit more but maybe it works; I suppose it is OK as you was able to upload FW etc.
Yeah, that's what I believed as well.
Budvar10:
2. correct FW in 16U2; make sure it works correctly - Rx, Tx and DTR must pass to the 2560 (Tx, Rx and RESET); BTW: R16 1k is for what ???, the best way how to check it is loopback test for Rx,Tx and RESET with some LED or DMM (if you are lack of advanced measuring devices).
I did the loopback test provided here: Loop-Back Test Instructions - IDE 1.x - Arduino Forum and passed, should I do a different loop back test?
The DTR is an input to the USB chip, how would it pass to the 2560 exactly?
The /Reset from my JTAG pin is what passes the RESET to the /Reset input on the MCU AND through a 0.1uF capacitor to the DTR input on the USB control. Did I do the circuit wrong?
If you look at the schematic for the Arduino Mega (Arduino Mega 2560 Rev3 — Arduino Official Store), it shows there needs to be a 1k to ground at the DTR input.
Budvar10:
3. Mega need the bootloader; if you are using IDE, you need not care about fuses
I do care about fuses if I use the first link, right? Since it is done via Atmel ICE and Atmel Studio 7.
If I am using the IDE, should I change code for the Arduino ISP, such as baud rate and heartbeat pins, etc? Does that affect whether the bootloader is uploaded properly?