Problem with Serial RS232

I have a problem
In Arduino Mega I have a code:
Serial.begin (9600);
Serial2.begin (9600);
Serial.println ("HELLO");
Serial2.println ("HELLO");
Serial0 is on COM8, Serial1 is on pins 18,19 and RS232 TTL / USB to COM2 converter.
On the computer (WIN10) I open the "Terminal" program and watch what happens on the COM2 and COM8 ports.
I read "HELLO" on COM8 port, but I read "}oakĺë<0>" on COM2 port
The speeds are correct, I don't know where the error is. Can anyone please advise? Thank you.


just to make things clear.

You use Serial Communication of Usb, Serial1 and Serial2 ?

Usb > COM8
Serial2 > COM2
Serial1 > ?


Pin 18,19 > Serial1
Pin 16,17 > Serial2
Pin 14,15 > Serial3

You read "HELLO" on COM 8 > USB -> works
You read "}oakĺë<0>" on COM 2 > dont work.

Is it possible that you want to use Serial1 with Pin 18,19 and you try to read from Serial2?

I'm sorry ... The correct code is this:

Serial.begin (9600);
Serial1.begin (9600);
Serial.println ("HELLO");
Serial1.println ("HELLO");

I really use serial1 with pins 18,19.
I think it will be a RS232 / USB converter (bad voltage levels?) Tomorrow I will try to make a converter from another Arduino and see.

It works. I had the wrong converters (other voltage levels) I tried to make the converter out of Arduino, it almost worked, but this converter did not communicate well with the display - it got stuck. Eventually I used the PL2303HXA, I had to change the drivers - mine was a Chinese clone - and now everything is flawless. Have a nice day and thank you ...

I think I'm having a similar problem and would appreciate your input.

I have a Belkin USB to Serial adapter with the Prolific PL2303TA chip. If I connect the RX and TX pins, the loopback works fine.

But I get garbage when I am reading serial output from the Arduino's TX pin.
I am using the Prolific Driver.
Is this a voltage issue? i.e, the Arduino is producing ~3V and the adapter is expecting 5V (or vice-versa)?


This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.