Hi,
I am planning to design customized PCB using AtMega 2560 chip with the reference circuit of Arduino Mega board. In this Circuit, there is the Chip Atmega 16U2 to program the Atmega 2560 chip using the USB. Is there any code needed to Program the Atmega 16u2 or will this chip directly work to Program the Main chip (Atmega 2560). if i need to work this atmega 16u2 to program the atmega 2560, what is the step needed to do in my custom board. Kindly let us know.
Yes. The Atmega 16U2 is just a standard microcontroller - it needs to be programmed to act as a UART-to-USB converter.
Did you try a search? eg, arduino atmega16u2 source code - Google Search
Hi Sir, Thanks for the reply. I found the source code from the link:
arduino-atmega16u2-master.zip (548.1 KB)
I will these code to generate the .hex file and download into the ICSP port connected in the ATmega 16u2 chip to program it? How to program this chip? Need hardware programmer to connect to this ICSP port to program? Kindly let us know
Hi sir,
Can i buy this Product to download the Firmware (.hex file) into the Atmega 16U2 using the ICSP port provided for it:
This will suit to program the Atmega 16U2 through ICSP port from USB Port (PC). Kindly let us know.
That should do it.
Hi Sir,
Can we download the (.hex file) into the Atmega 2560 Chip directly using the ICSP port provided for Atmega 2560 IC using the same Product without using the Atmega 16U2 chip?:
I just have an idea. Kindly let us know.
The ATmega2560 has JTAG - not ICSP:
For someone designing a PCB, you do seem to be lacking any sign of experience with what's involved...
Are you sure it wouldn't be better to just use an actual Arduino board... ?
Hi sir,
I thought the 8-bit AVR microcontrollers are programmed in several serial modes, one of which is SPI. I thought we need the typical SPI signals (MOSI/MISO/CLK plus Vcc and GND) along with the Reset line. Therefore we have to make those signals available on the PCB, through a 6-pin connector, for instance, which is typically called ISP (or ICSP) connector.
I have an idea to use this Programmer part:
and then this Part AVR ISP 10 Pin to 6 Pin Adapter board connected to Arduino board:
The Selected programming module should be recognized by avrdude
, which is the application used by the Arduino IDE to flash Atmel/Microchip (AVR) MCUs. We have to plug the USB connector into your computer and one end of the cable goes onto the ISP /ICSP header on the PCB.
ICSP Connector in the Board:
Will this Programmer Part and 10 pin to 6 pin adapter (ICSP Port) can be used to download the .hex file into the Arduino? Kindly let us know. will this work?
My mistake - the ATmega2560 does support serial programming.
But note that the serial programming does not necessarily use the SPI pins:
Hi sir, Thanks for the reply. I understood that we can use the Programmer Part and the 10 pin to 6 pin adaptor which i mentioned in the earlier post can be used to download the .hex file into the atmega 2560 using ICSP Port.
Hi sir,
This will work? Kindly confirm.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.