I am trying to read and write character through RX1/TX1 ports on mega2560. I downloaded a sketch that read from a terminal (running on a PC to which the RX1/TX1 are connected through a USB port). If I connect the Mega to the PC through the USB port, the output from TX1 (as monitored by Saleae login analyzer) looks fine, I see the characters typed. However, if I power Mega with DC power supply (12V) or even through the USB port, but from a USB wall power supply, the TX output doesn't make any sense. The logic analyzer shows '255' right away. Can someone guess what is going on, or what I need to do so the TX looks okay. It is quite possible that the RX (as seen by Mega) may be in trouble. But I'm not sure how I can get around that either.