Hello,
Does someone knows a way to connect a JTAG interface to the Mega ? Even if some addtional wires are needed I would be interested by any solution.
It is easy. Follow the following pinout:
TDI = Analog 7
TDO = Analog 6
TMS = Analog 5
TCK = Analog 4
RST = Reset
JTAG port pinout is:
1 TCK
2 GND
3 TDO
4 VTr (target voltage)
5 TMS
6 RST
7 Vsupply
8 NC
9 TDI
10 GND
You need to activate JTAG fuse, and upload your own firmware. You also need a JTAG debugger that works with ATmega1280 (I guess the only one out there is JTAG ICE MKII from Atmel).