RS232, MAX232 & Serial MEGA

I'am arduino newbie... :slight_smile:

I have create a new project for read four serial ports. I using Serial Port Arduino Mega(Serial 1,2) and MAX232 transceivers (for the conversion RS232 to TTL 5V) like this:http://arduino.cc/en/Tutorial/ArduinoSoftwareRS232

My PC Serial exit with 3 wires (RX,TX and GND)

]:slight_smile: have a problem: If I use Arduino serial embedded, the data reading it works only with GND not connect... and if I use the serial connected to MAX232 it works only with GND CONNECTED!!!...

Somebody help me???

Thanks a lot and sorry for my english! :cold_sweat:

If I use Arduino serial embedded, the data reading it works only with GND not connect.

What ground where?
It is hard to know what your setup is, you do not describe it.
Grounds must always be common.

I explain you better...

In my simulation i have connected the serial on PC for trasmitted data.
My cable have 3 wires:
Green: TX
Blue: RX
Black: GND

====================================
Step1: Connect My serial directly to arduino:

Green on TX1
Blue on RX1
Black not connected

And I reading all data!! .. If connected black wire (GND) on arduino GND the serial data stopped work

====================================
Step1: Connect My serial to MAX32 thought arduino digital pin:

Green on ArduinoPIN10
Blue on ArduinoPIN10
Black Arduino GND

And I reading all data!! .. If I disconnect black wire (GND) on arduino GND the serial data stopped work

thanks....

:slight_smile: i'm sorry... Errata corrige

====================================
Step2: Connect My serial to MAX32 thought arduino digital pin:

Green on ArduinoPIN10
Blue on ArduinoPIN11
Black Arduino GND

And I reading all data!! .. If I disconnect black wire (GND) on arduino GND the serial data stopped work

Oof! That page referenced looks like a plate of spaghetti. As G_M says, all the grounds in
such a setup should be common. With spaghetti like that, 99% probably you have something
plugged into the wrong slot on the whiteboard.

:blush: :blush: :blush:

the plugs are OK!

what are kind of differences between "Arduino Serial embedded" and this "http://arduino.cc/en/Tutorial/ArduinoSoftwareRS232" ?

The arduino chip (328P) outouts 5V and 0V from the serial output an board. The Max 232 ouptus a more proper +5V and -5V. when you hook the wires up directly WITHOUT GROUND the float on the wires work to have the signals slide around and fall in a voltage range that your PC serial port is able to function with. For Now. re-arrange your desk or add some other circuit somewhere and things may not float the same and it will quit working.

Or in other words - You Got Lucky!

Step1: Connect My serial directly to arduino:

Green on TX1
Blue on RX1
Black not connected

And I reading all data!! .. If connected black wire (GND) on arduino GND the serial data stopped work

===================================

This is wrong, it is nt happening like you think,you have another mistake that is making you think it is working OK just because you are reading data. You got lucky with your fault. You need to find the real fault so that connecting the ground does not stop it working.

Anyway, connecting directly the Pc serial port to the arduino is not a good way of doing it ! You will burn the digital pins of arduino.

Can you post a schema of the way you interface the MAX232 IC to the arduino ?

May be it will allow us to understand.

I had never trouble with arduino + MAX232 + Serial PC.

Grag

He says he followed the scheme in the link given in the first posts, and says his
connections are totally correct.