Hello, I'm testing the serial comunication qith Arduino Mega, using the serial comunication example. If I use the USB cable I have non problems, but if I try to use the Serial2 or Serial3 it doesn't work. With the USB I can read with serial monitor the correct sequence of 1 and 0 while with Serial2 I read strange Ascii symbols (square and Hearts). How can I solve this problem since I can't use the USB comunication? Thank you, Tommaso
The other hardware serial ports on the Mega are intended to be used for things like GPS's and RFID readers, etc. Serial port 1 (Serial) is the only one connected to the ftdi chip that interfaces with the USB port.
Why can't you use Serial to talk to the PC?
Hi, thankyou for your cooperation. My problem is that I can't use the USB serial, but I need to use a normal serial cable because my panel only has a serial port and none usb port. But If I use the Serial command through USB I can read and write correct data (using serial monitor with a normal PC), but if I use Serial command connecting with the Pin for Tx and Rx on the board and I use the serial monitor I only read strange ascci charaters... Can you tell me what I'm doing wrong? Thank you, Tommaso
I need to use a normal serial cable because my panel only has a serial port
What panel? Tell us about this panel.
I'm using a Weintek MT8000, but the problem is not on the panel. I'm not understandig why if I use the serial.write with the usb cable the comunication is ok, but if I use a serial cable it doesn't work :O(
I'd guess that the problem is that the MT8000 has a true serial port, with -12/+12V input/output, not 0/+5V that the Arduino uses.
You will probably need some hardware between the Arduino and the MT8000 that manages the conversion from 0/+5 to -12/+12V.
The serial port in the MEGA is not a true RS-232 port. you need a TTL/CMOS to RS-232 converter to bring it to +12/-12 specs.
I use the ST232 chipp, http://www.mouser.com/Search/Refine.aspx?Keyword=ST232
Never had an issue with it.
Thanks. I will try. Tommaso Brocca
I had a similar experience. >:(
A Mega using serial 1,2, & 3 into a custom board using a Xport , a Max232, and a DB9. The Mega was wired to the DB9, and I was monitoring the Xport from Telnet.
Basically I was coming into the wrong end of the MAX232. By pulling it out and wiring directly to the Xport it worked fine.
I think your problem is around the other way to mine. The MT8000 most likely has a proper UART com port running a high level input. You need a buffer in-between like a MAX232 to go from LOW to High levels.
I didn't find a lot of posts about serial problems like this one, so I thought I would add my 2 cents to this post. hope it helps someone.
Thanks. I resolved the problem using a convertor for the true RS232 real port. Now everything is working. Tommaso
is this related?: http://code.google.com/p/arduino/issues/detail?id=131 looks like there is a fix planned in Arduino 19.