Author Topic: RS-232 flow control questions  (Read 957 times)

0 Members and 1 Guest are viewing this topic.

Offline alank2

  • Super Contributor
  • ***
  • Posts: 2004
RS-232 flow control questions
« on: February 18, 2018, 12:31:51 am »
First, why the RTS/CTS/DTS/DSR?  Why not just have a single signal on each side that goes high when it is able to receive and goes low when its buffer is full?  What is the point of, are you ready, yes I am, etc.  Are there systems that simply tell the other side if they can receive or not?  rx (input), tx (output), rxReady (output), txReady (input)...
 

Online Wimberleytech

  • Frequent Contributor
  • **
  • Posts: 916
  • Country: us
Re: RS-232 flow control questions
« Reply #1 on: February 18, 2018, 02:30:04 am »
First, why the RTS/CTS/DTS/DSR?  Why not just have a single signal on each side that goes high when it is able to receive and goes low when its buffer is full?  What is the point of, are you ready, yes I am, etc.  Are there systems that simply tell the other side if they can receive or not?  rx (input), tx (output), rxReady (output), txReady (input)...

Because the protocol was developed when dinosaurs roamed the earth.  :-//
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 6944
  • Country: us
Re: RS-232 flow control questions
« Reply #2 on: February 18, 2018, 02:40:02 am »
The DSR/DTR signals supervised the phone line connection, I believe.  The RTS/CTS supervised the flow of data.
I go back to the days of acoustic couplers at 110 Baud and the phone connection wasn't always reliable.
Mine was in a neat wood box with hinged lid.  You dial the phone, wait for it to answer and then place the handset in the coupler.  Yes, I still have a rotary phone.  Somewhere along the way I lost my coupler...

http://www.lm-technologies.com/wp-content/downloads/wireless%20adapters/LM048/Application%20Notes/DTR-DSR-RTS-CTS_Difference.pdf

 

Offline rhb

  • Super Contributor
  • ***
  • Posts: 2730
  • Country: us
Re: RS-232 flow control questions
« Reply #3 on: February 18, 2018, 03:52:08 am »

RS-232 was used to connect almost everything.  So everyone made sure their wires got included.  I used to keep a kit of stuff in my desk at school to make up RS-232 cables.  Fortunately I never had occasion to use anything but 2-3-7 for XON/XOFF.  Printers and modems were where it got messy.

My canonical test for a new sys admin was to say the word "modem".  If they flinched I knew they had significant experience.  I fixed a motorcycle for an admin at work in exchange for him configuring my Telebit Trailblazer.  I fixed the bike no problem, but he never was able to make the Trailblazer work with SunOS 4.1 on a 3/60.  Of course, before that I'd already spent days on it.  He made a pile of money selling the ISP he started in his apartment, so he knew his stuff.

Before we got Ethernet, I used RS-232 to connect a MicroVAX II in a BA123 "world box" to the 11/780 4 floors down.  We ran the wires in the HVAC plenum, so I had to buy special wire.
 

Offline ikrase

  • Regular Contributor
  • *
  • Posts: 141
  • Country: us
Re: RS-232 flow control questions
« Reply #4 on: February 18, 2018, 05:33:25 am »
RS-232 was originally transmitted over DB-25 connectors, which really contained the kitchen sink -- including not just one but *two* UARTs.


So there were a fair number of things available... so they got used... and ported into the DB-9 that is far more familiar as a serial connector.

Of course, it's definitely useful to have *some* pin that you can use to toggle the RS-485 transciever. I wish we had RS-485 as the standard rather than 232.



Of course, all those pins came to some use. In the early 2000s you could buy serial PIC programmers that used the flow control pins to bitbang the PIC synchronous serial ICSP protocol. Meanwhile, a continuous stream of 1's and 0's at high bandwidth on the data line would drive a simple charge pump to provide the high (12V+) programming voltage needed for older FLASH PICs.
 

Offline drussell

  • Super Contributor
  • ***
  • Posts: 1129
  • Country: ca
  • Hardcore Geek
Re: RS-232 flow control questions
« Reply #5 on: February 18, 2018, 04:19:31 pm »
First, why the RTS/CTS/DTS/DSR?  Why not just have a single signal on each side that goes high when it is able to receive and goes low when its buffer is full?

Simple.  Because RS-232 is intended to connect a terminal to a modem and a modem to a computer and you need to know more than just "you can send".

Data Terminal Ready is needed for the terminal to tell the modem it is ready.  Drop this and the modem hangs up.

Data Set Ready means the modem is ready to send / receive data.

Carrier Detect tells the terminal that the modem has a connection to another modem.

Request To Send tells the modem you want to send data out from your terminal.

Clear To Send tells the terminal that the modem is ready for sending data.

etc. etc.  This is all well documented and comes from the historical needs of the interface in its intended usage.  i.e.:

Quote
The RTS and CTS signals were originally defined for use with half-duplex (one direction at a time) modems such as the Bell 202. These modems disable their transmitters when not required and must transmit a synchronization preamble to the receiver when they are re-enabled. The DTE asserts RTS to indicate a desire to transmit to the DCE, and in response the DCE asserts CTS to grant permission, once synchronization with the DCE at the far end is achieved. Such modems are no longer in common use. There is no corresponding signal that the DTE could use to temporarily halt incoming data from the DCE. Thus RS-232's use of the RTS and CTS signals, per the older versions of the standard, is asymmetric.

RTS/CTS weren't originally intended for "flow control" from buffered modems like we think of in "modern" times.  It was from very early half-duplex operation but was used for the similar property of "flow control" later when effective line speeds started to not be == local terminal connection speed due to compression with MNP, etc. etc.

« Last Edit: February 18, 2018, 04:47:03 pm by drussell »
 

Offline glarsson

  • Frequent Contributor
  • **
  • Posts: 807
  • Country: se
Re: RS-232 flow control questions
« Reply #6 on: February 18, 2018, 06:51:22 pm »
... and ported into the DB-9 that is far more familiar as a serial connector.
DE-9 please. A DB-9 would be a nine pin connector in the same shell as a DB-25.

D is the connector shape/type D-subminiature.
Second letter is the shell size.
The number is the number of pins.
DB-25  Big serial.
DE-9  Small serial.
DE-15  VGA.
DD-50  Old SCSI connector.
DB-13W3  Size as big serial but with 3 coax and 13 normal pins (was common on Sun workstations).
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf