0
\$\begingroup\$

I'm building a specific PCB around the Arduino Mega 2560 platform. Based on the official Mega 2560 schematic, there is two microcontroller; the 16U2 and 2560-15AU. Both of them have their own ICSP pin header.

I plan to load the bootloader with an another Arduino as ISP. Do I just need to do the process with the ICSP pin for the 2560-15AU only or do I also need to do it for the 16U2?

\$\endgroup\$
  • \$\begingroup\$ Honestly the 2560 is ancient and very expensive... unless you're making a knock-off board to reuse existing firmware like for 3D printer, I would suggest going with one of the many Arduino arm-based processors. \$\endgroup\$ – MadHatter Apr 20 at 21:05
  • \$\begingroup\$ Thanks for the suggestion. I tested my code and wiring based on the Arduino Mega so I think for this project, I'll be sticking with it. I know as far as I know that only the Arduino Zero and Due have Arm processors. I've never used them before so I don't know how different it'll be. \$\endgroup\$ – Agriculex Apr 21 at 13:28
1
\$\begingroup\$

I think we need to clear up what both those chips to.

You can program the 2560 with the ICSP header - yes, but every time you want to program it you will need to use that 6 pin connector.

The 16u2 is loaded with a special firmware that allows you to connect it to a USB port and it will show up as a USB device. This is how your normal Arduino Mega works. The 16u2 is loaded with USB drivers and such, allowing it to be recognizable on your computer. Then when you click upload on the computer, the 16u2 will program the 2560 via RX/TX. There are plenty of articles that explain that process in depth.

The reason you need an ICSP header for the 16u2 is so you can load the USB bootloader onto it to allow it to interface with a computer.

The reason you need the ICSP header for the 2560 is so that you can load it with its own initial core bootloader, which will then allow it to be programmed via RX/TX from the 16u2 via USB.

If you only put the ICSP header on for your 2560, sure, you can use the 2560 like a normal Mega (MINUS the COM PORT readout!!), you'll just need another Arduino to program it every single time. At this point, your 16u2 will be worthless and not do anything unless you have alternative methods to load it with the USB bootloader.

If you are going to be putting the 16u2 on your PCB, might as well include a method to program it and add USB connectivity! Also you'll want the 16u2 working so that you can pull up com ports for debugging.

Best of luck

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Oh I see. That makes a lot more sense. I do plan to load the bootloader once and then use the usb to communicate for the rest. Is the process of uploading the firmware for the 16U2 different than the Arduino for the 2560? \$\endgroup\$ – Agriculex Apr 20 at 21:51
  • \$\begingroup\$ The actual uploading process is the same but there are different bootloaders you have to track down. Search the web you'll find it. \$\endgroup\$ – HavocRC Apr 22 at 1:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.