I recently bought an Arduino Mega2560 board to use in a one-off project. This question is not about the atmega2560 or the code running on it, but about the atmega16U2 that board uses for its serial<->USB bridge. Essentially, this bridge seems to drop characters.
A) mega2560 --RS232-> 16U2 --USB-> PC (linux)
B) mega2560 --RS232-> 16U2 --USB-> PC (WinXP)
C) mega2560 --RS232-> FTDI --USB-> PC (WinXP)
I am running Br@y's terminal on the WinXP PC to monitor the characters sent by the mega2560, and just "cat /dev/ttyXXX" on the linux one. There is no traffic in the opposite direction.
I have run two sets of firmware on the mega2560:
1) an arduino sketch which sends a burst of about 20 characters once every few seconds, at 9600 baud.
2) a gcc-compiled program (not based on any arduino code or libraries) which keeps the RS232 transmitter saturated at up to 115200 baud.
Firmware (1) on hardware (A) drops characters very occasionally - maybe a burst of 5-10 characters once or twice per day.
Firmware (2) on hardware (B) drops characters every few seconds at 9600 baud, and drop them all over the place at 115200 baud.
Firmware (2) on hardware (C) seems to be OK, but hasn't been so exhaustively tested.
Other combinations are untested as yet.
This seems to point the finger at the 16U2 chip that forms the RS232<->USB bridge on the arduino mega2560 board, but if this is the case I am surprised not to have found others with similar experiences here, on the arduino forums, or more generally. I have however seen reports of other bugs with it, so I was wondering if there is any wisdom available here before I either abandon it (in favour of the FTDI) or start trying to debug its code.