replace Atmega16U2 on Arduino Mega 2560

Please for your help !

I've replaced defective Atmega16U2 on Arduino Mega 2560.

Voltages looks good and 16MHz waveform looks OK.

I can see the serial port from the PC.

Please describe how to put the correct firmware on Atmega16U2.

Is it working only as USB to serial adapter of it communicates something adiitional to the main MCU ?

Flip cannot load C:\Program Files (x86)\Arduino\hardware\arduino\avr\firmwares\atmegaxxu2\Arduino-

COMBINED-dfu-usbserial-atmega16u2-Mega2560-Rev3.hex . Is says that the address is out of range.

Uploading flash from a good board to the buffer and re flash it to the repaired one is not working too.

Thank you in advance !

John

It is working only as USB/serial converter for ATmega2560.
ATmega16U2 has its own ISP 6 pin connector. You will need ISP programmer like USBasp or another Arduino with ArduinoISP sketch. You can upload with avrdude tool then.

Uploading flash from a good board to the buffer and re flash it to the repaired one is not working too.

This is not clear to me. What exactly you tried? Via ISP? It should work.