Pages: [1]   Go Down
Author Topic: Arduino MEga: Serial2 Problems  (Read 1939 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 14
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 634
Posts: 50243
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 14
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 634
Posts: 50243
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I need to use a normal serial cable because my panel only has a serial port
What panel? Tell us about this panel.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 14
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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(
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 634
Posts: 50243
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

0
Offline Offline
Sr. Member
****
Karma: 1
Posts: 415
MEGA_Stick_II is here
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: May 29, 2010, 12:08:08 pm by Jassper » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 14
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks.
I will try.
Tommaso Brocca
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 21
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I had a similar experience.  >smiley-sad

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.

M
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 14
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks.
I resolved the problem using a convertor for the true RS232 real port.
Now everything is working.
Tommaso
Logged

Minnesota USA
Offline Offline
Sr. Member
****
Karma: 1
Posts: 323
Made it mahself outta sand 'n wahr.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

 is this related?:
http://code.google.com/p/arduino/issues/detail?id=131
looks like there is a fix planned in Arduino 19.
Logged

Pages: [1]   Go Up
Jump to: