I am using a 2560 Mega as an interface card for a machine control panel, communicating using the Modbus protocol over the USB serial channel. Since mouse and keyboard also use USB, I modified the Modbus library to allow the user to specify an alternate serial channel. After the usual compilation issues, I got a compiled version running, but was getting garbage communications. For debugging, I started adding Serial.print statements (output to the SDK monitor screen). At one call level, the print statements caused the program to start communicating properly over the other serial channel. Such behavior suggest a timing issue somewhere deep in the Arduino monitor software. Has anyone observed similar behavior, or gotten multiple serial channels to operate successfully? Any suggestions, other than living with possible bandwidth bottlenecks?
Oh - this was compiled with the latest SDK version (Arduino 1.0)