Correct me about RS232 If wrong?

Thread Starter

cRash1001

Joined Dec 22, 2015
15
This is my first project and I need to design a RS232 DB-9F port for it. This is my understanding of what I need to do. Correct me if I am wrong!!

So I need UART RS232 full handshake. Since FULL HANDSHAKE requires all DB9 pins except RI and DCD, that leaves me with 6 connections between a RS232 voltage-converter IC and DB9 pin. That means 3 pins for receiving (CTS,RX,DSR) and 3 for transmitting (RTS, TX,DTR). That means i need a RS232 voltage-converter IC with 3/3 Driver/Receiver.
Is this all I need, or did I miss something?
 

MaxHeadRoom

Joined Jul 18, 2013
19,738
Is it possible to use software handshake in your application, XON/XOFF , this way you only need a 3 wire cable.
Gnd. Tx & RX.
Or for HW handshake usually you can get away with RTS/CTS.
Max.
 

Thread Starter

cRash1001

Joined Dec 22, 2015
15
Is it possible to use software handshake in your application, XON/XOFF , this way you only need a 3 wire cable.
Gnd. Tx & RX.
Or for HW handshake usually you can get away with RTS/CTS.
Max.
Thank you very much. I am also looking into using odroid for my project, would you happen to know some forum or sites for odriod
 

Thread Starter

cRash1001

Joined Dec 22, 2015
15
Is it possible to use software handshake in your application, XON/XOFF , this way you only need a 3 wire cable.
Gnd. Tx & RX.
Or for HW handshake usually you can get away with RTS/CTS.
Max.
I havent designed upon that. In terms of complexity which out be more complex a software handshake or hardware handshake.
 

ian field

Joined Oct 27, 2012
6,539
That sounds about right. Something like a MAX239 or something similar would do the trick.
The one I remember is the MAX232, but I don't think it has enough drivers for a full spec D9 port.

The TS seems to be asking about UARTs, there are various types and googling that should get some hits and datasheets.

AFAIK: most UARTs deal entirely with TTL levels so drivers like you mentioned will be needed as well.

The main feature of the Maxim drivers, is they incorporate charge pump voltage doublers to generate plus and minus 10V from the 5V Vcc. If the TS has plus and minus 12V available, the choice of drivers is much bigger.
 

JohnInTX

Joined Jun 26, 2012
3,947
@ian_field Ha. Good thought.
The odroid (kind of like a Rpi or Beagle Board) does have a conventional UART console port. The USB-Serial dongle shown here kind of implies that it uses TTL levels as the picture seems to show just an FDTI USB-Serial chip without level shifting.
@cRash1001 might need to clarify a bit. Are you using the console port?
 

Thread Starter

cRash1001

Joined Dec 22, 2015
15
@ian_field Ha. Good thought.
The odroid (kind of like a Rpi or Beagle Board) does have a conventional UART console port. The USB-Serial dongle shown here kind of implies that it uses TTL levels as the picture seems to show just an FDTI USB-Serial chip without level shifting.
@cRash1001 might need to clarify a bit. Are you using the console port?
Yes, I am using the RS232 for console port. I have settled for a ICL32243 transceiver. It has 3 drivers and 5 receivers out of which 3 drivers for TX and 3 Receivers for Rx. The ICL32243 also has automatic power down, very useful to conserve power when on battery. I just drew the schematics and will post again when the circuit is made and it works. If you guys know some IC better than ICL32243 plz suggest.
 

ian field

Joined Oct 27, 2012
6,539
This is the schematic and do I have to connect RI and DCD for full handshaking or can I just leave it.
Its so long since I did anything with RS232, that I have to call from distant memory.

Ring Indicator is a modem thing - and not always used then.

Data Carrier Detect is often looped back to its own port - there's software handshake, there's hardware handshake and various shades of grey in between.

The interface can be as simple as Rx, Tx and a ground return - that's the software handshake, but its where you're likely to find inputs looped back to outputs on the same port.

A fully hardware handshake uses all the pins, with the possible exception of RI.

You also have to be mindful of DTE/DCE identity - the original plan was that a computer (or terminal when all there was, was mainframes) would connect to a modem with a straight cable - if you connect 2 computers together; a crossover or null-modem cable is required.

RS232 has been around for so long, its got contaminated by various people's ideas of how it should be done - if you're going to play with RS232; you need a breakout box with 8 bi-colour LEDs, each with at least 680R current limiting. The RS232 levels span plus and minus 12V (will only be 10V with Maxim charge pump interfaces). That will indicate polarity (logic level) and you can see at a glance which pins are outputs.
 
The way it USED to work:

DTR/DSR - basically say the interfaces have power
RTS/DTS were used for hardware handshaking
TXD/RXD were transmit/receive
SG was signal ground
FG - was frame ground

RI - was "the phone is ringing"
DCD - was I got carrier.

The stuff I worked on sometimes used DTR/DSR and not RTS/CTS. Others got DTR/DSR backwards.
I initially worked with real 25 pin Bell stuff.

Then there was not enough voltage (e.g. MAC serial ports which are RS422 of sorts). The +-5V rather than 10 or 12. The original spec used 3-25 and -3 to 25 volts.

Reminder, that TTL serial has the levels reversed.
 

ian field

Joined Oct 27, 2012
6,539
The way it USED to work:

DTR/DSR - basically say the interfaces have power
RTS/DTS were used for hardware handshaking
TXD/RXD were transmit/receive
SG was signal ground
FG - was frame ground

RI - was "the phone is ringing"
DCD - was I got carrier.

The stuff I worked on sometimes used DTR/DSR and not RTS/CTS. Others got DTR/DSR backwards.
I initially worked with real 25 pin Bell stuff.

Then there was not enough voltage (e.g. MAC serial ports which are RS422 of sorts). The +-5V rather than 10 or 12. The original spec used 3-25 and -3 to 25 volts.

Reminder, that TTL serial has the levels reversed.
There used to be a site called pinout.ru, but I just tried it and the domain is for sale.

Ages ago, I archived a lot of stuff from there - if its needed, I could look on my other PC for it.
 

MaxHeadRoom

Joined Jul 18, 2013
19,738
I worked with RS232 when the 25pin D plug was largely used for the PC modem so you could communicate with a Bullitin board!
Now it is mostly with CNC machines that use it for Pgm download, but most use XON/XOFF and 3 wire cable.
Max.
 

sailorjoe

Joined Jun 4, 2013
361
cRash, I think you have your connector right, but in fact you may have more than you actually need. As you've read here, there are lots of variations of how good 'ol RS232 is implemented. First, ignore RI (Ring Indicator) and DCD (Data Carrier Detect), since these only applied when we used those annoying telephone modems. If you can get just Rx, Tx, and GND connected, I'll bet your connection will work, especially on a relatively modern control port. If you start to have problems, add in the CTS (Clear to Send) and RTS (Ready to Send) signals. If you still have problems, you can try adding in DTR (Data Terminal Ready) and DSR (Data Set Ready), but this would be a long shot. Instead, you might be better off looking for things like polarity problems.
Just did a check, and it looks like the odroid console port only has four pins, and they are 1: Vcc (3V3), 2: TXD, 3: RXD, and 4: GND.
The console port is a 3.3V interface. Make sure your DB9 connected device is only sending and receiving 0 - 3.3V signals.
odroid wiki: http://odroid.com/dokuwiki/doku.php?id=start
 
Top