MAX232 only support one Serial Port?

Greetings to all!

Recently I'm building a project that requires 2 serial ports. I'm using arduino mini pro for this project.
One port only receives data, and another one transmit and receive data and put the data inside a SD card. Data is not simultaneously transmit nor receive, so we can forget about the sequence which will clash on with the timing.

To meet all these requirement, i used SoftwareSerial for the extra serial port.
Eventually, I built a single MAX232 circuit to run these 2 serial ports but end up only one port is working. The other one is totally not function at all.

Hence, my question is, does MAX232 only can support one serial port? I checked the datasheet and found that it can support 2 ports. Or should i have to build with two MAX232 chips circuit for each serial port? :slightly_frowning_face:

Hi,

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

And the exact part number of the MAX232 chip please.

Have you swapped ports to make sure that one is not working?

Tom... :slight_smile:

MAX232 has exactly 2xRx and 2xTx. It is enough for Rx/Tx signals for 2 ports. Your problem is probably somewhere else.

The circuit i built is according to this schematic...However, i used DTE instead of DCE.
Both serial ports are female RS232.

The MAX232 chipset i used was MAX232CPE.

DTE connector has swapped pin 2 and 3. Compare it with DCE!

Budvar10:
DTE connector has swapped pin 2 and 3. Compare it with DCE!

Yeah, indeed. You are right!
But I was using both in DTE mode, and tried swapping pins... Really scratching my hair out of my head.

The datasheet for the MAX232 and all the other related chips is consistent in its own way. All the inputs and outputs are described from the point of view of the MAX chip. R1OUT is the output of the first receiver circuit. This is actually an input to your Arduino - the RX pin.

An Arduino Micro has only a few pins that can be used for SoftwareSerial RX. The Pro Mini does not have this limitation, so that's not your problem.

Question :Is it alright for me to use DTE instead of DCE? Under what condition we have to use DCE?

DTE and DCE are just conventions for wiring the plugs and sockets. If you plug a male into a female, the transmit on the male should go to the receive on the female. That's why you can never say if pin 2 is transmit or it is receive. It depends if it is a plug or a socket you are looking at.

Hello all! After several attempts, undergo numerous emotional swings, I had finally decoded this problem! :smiley:
I attached the schematics to whoever in the future that encountered the same issue as i am.

I discovered that, some references found on the internet provide false/buggy information.

In SoftwareSerial, please do remember:

#include <SoftwareSerial.h>

const byte rxPin = 2;
const byte txPin = 3;

// set up a new serial object
SoftwareSerial mySerial (rxPin, txPin); //SoftwareSerial(rxPin, txPin, inverse_logic)


thumthum:
I discovered that, some references found on the internet provide false/buggy information.

Who would have thought?

:grinning: :grinning: :grinning: :grinning: :grinning: :grinning: :grinning: :grinning: :grinning: :grinning:

DTE and DCE are just conventions for wiring the plugs and sockets. If you plug a male into a female, the transmit on the male should go to the receive on the female. That's why you can never say if pin 2 is transmit or it is receive. It depends if it is a plug or a socket you are looking at.

I wish I had a dollar for everyone who didn't know that....

I would expert almost everyone to know that DTE represents a computer (or terminal) and DCE represents a modem. I would think that would be obvious, but plug/socket thing is something else.
Everyone knows that older computers with DB9 com ports had male connectors and those are DTE.
By the same token , anyone who ever bought a modem back in the day (before the internet when all they had was BBSs) knows they came with female connectors. Fewer people know that a null modem cable doesn't have the Tx & Rx crossed. But this part:

If you plug a male into a female, the transmit on the male should go to the receive on the female. That's why you can never say if pin 2 is transmit or it is receive. It depends if it is a plug or a socket you are looking at.

is less known I think, though it would seem obvious in view of the DTE/DCE thing.

It was nice back in the day. I have an RS232-HPIL convertor and HP thoughtfully explained everything about RS232. Sigh. I miss HP manuals. Back before the internet they were great references. Though, as pointed out above, you could trust HP! 8^)

(Though I am not sure why almost every manual had an ASCII table!)