Mega 2560 Serial Communications Problem On Alt Ports

I have two Fundino Mega 2560 boards and they both do the exact same thing.

Here's a sketch:

void setup(){ Serial.begin(9600); Serial1.begin(9600, SERIAL_8N1); delay(2000);

Serial.println("ABC"); Serial1.println("ABC"); }

void loop() {

delay(1000); Serial.println("Sent"); Serial1.write(66); }

Serial is going via USB to the IDE and it gets good data. Serial 1 is going to an RS-232 port on the same computer running a C# program to capture bytes coming across the serial port. The Arduino side is 9600 8-N-1 and so is the computer side. As you can see by the sketch, I am sending a binary 66 every second to Serial 1. The computer receives random stuff, but mostly a binary 47 and mostly just one byte every second.

Yes, the baud rate, stop bit, parity, etc. are the same. The C# program works perfectly as it is with a different device that is talking 9600 8-N-1. I have completely isolated this problem to the Arduino side.

Doing a loopback on the Arduino between port 0 and port 1 works perfectly! I tried that and the Arduino is completely happy talking to itself, but not happy with my computer or the other device.

I also interfaced the Arduino earlier to read on port 1 and tried both the computer and the other device. Reading produced the same type of result. The Arduino was unable to make sense of the transmitted byte(s)--three at a time about every 5 seconds maximum while the C# program on the computer and the other device both love each other and work perfectly.

The Arduino does not play nice and is not communicating at 9600 8-N-1 even though it was set to do so. I can't figure out what it's doing and tried variations of other communication protocols (mismatched on purpose just to see: 7-N-1, 8-E-2, etc.) and I tried alternate baud rates. Nothing seems to bridge the gap. I also tried this disconnected from the IDE using port 0 and port 2. All three ports behave the same.

Please help. Without the ability to communicate serially, my project is dead in the water.

Thanks for any insight. I hope I've done something stupid that someone can point out; I have about 8 hours debugging and no solution. I am inclined to believe there is a firmware issue on my boards.

Thank you for your time.


What device are you using to convert the 5v serial to RS-232 voltage levels?

I had not realized that there was a voltage difference. Thank you for pointing me in the right direction!


Just as a follow-up--bought the SchmartBoard RS-232 module available locally here at Fries Electronics. The board isn't specific to the Arduino, but for a little under $14, it saved me a little time and effort. My communications are working perfectly now. Thanks for the kick in the right direction.