Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
Resource icon

Unravelling the RS-232 standard. 2014-04-07

One of the most confusing interface standards must be RS-232. Since its introduction in 1962, it has undergone numerous changes as it was put to use in many applications not originally envisioned. Over the years, many products were designed by engineers who interpreted the specifications in their own way often resulting in incompatible connections between products.

The original intent was to connect a computer access point (about the size of a small refrigerator in the 1960s mainframes) to a modem supplied by the telephone company (read Bell). The modem had a gray telephone attached to it and operated at 300 baud. In those days, the telephone company “owned” all the wiring inside a building and didn’t allow anyone to arbitrarily hook up equipment to the line. For a significant fee, a “data center” could rent a modem from the telephone company which terminated in the familiar 25-pin D-type connector. Computer manufacturers would match the 20-pin D-type connector to their access point.

The signal lines inside the 25-pin connector were designed to control and send data to and from the modem. The two handshake lines, Data Terminal Ready (DTR) and Data Set Ready (DSR) indicate to one another that power was on in the respective devices. Request To Send (RTS) was a signal from the terminal to the modem to go “Off-hook” and turn on the carrier signal. After a delay, the modem would respond with Clear To Send (CTS) which indicated that the terminal could send the data on Transmit Data (TXD) line.

If the modem was idle, it would be “on-hook” but would be monitoring the ring signal. It would indicate to the terminal that the phone was ringing by activating the Ring Indicate (RI) signal. The terminal could then signal the modem to go “off-hook” and wait for Data Carrier Detect (DCD) signal. This was to eliminate any noise on the signal line until everything stabilized. The terminal gated on the Receive Data (RXD) only after receiving the DCD signal.

All this handshaking was eventually made obsolete as technological advances gave us modems that were full duplex and operated reliably at 56k baud. Also, with the introduction of the PC in 1980, the 9-pin D-type connector was introduced. The RS-232 standard changed as usage shifted to connecting computers directly to external equipment. There again, many products were created with custom signaling and were not universally compatible with all equipment. The latest specification (TIA-232-E) has attempted to make some changes that are finally addressing the issue of symmetry in control signaling. There are no hardware changes; just one name and function change for the RTS signal line. Instead of calling it Request To Send, the signal is re-named Ready to Receive (RTR) making “hardware handshaking” symmetrical. Each side now has a signal which stops transmission from the other side if it finds that it can’t handle the volume of data being sent to it.

Having said that, I must now go on to say that hardware handshaking should also be obsolete given the speed of today’s microcontrollers and the size of memory buffers they contain. There should be no overrun situations and acknowledgement to packet reception and re-transmission of corrupted data can all be handled with intelligent protocols. This suggests that the simplest serial interface consisting of TXD and RXD plus GND is sufficient for most applications.

Attached is a schematic of a circuit implementing RS-232 that can be configured as Data Terminal Equipment (DTE) or Data Communication Equipment (DCE) by inserting the appropriate male/female 9-pin D-type connector and moving 3 jumpers.

References:
http://en.wikipedia.org/wiki/RS-232
http://bitsavers.trailing-edge.com/pdf/ibm/27xx/A22-6864-0_2701_Data_Adapter_PrincOps_Jul65.pdf
http://bitsavers.trailing-edge.com/pdf/ibm/27xx/GA22-6864-5_2701_Component_Description_Aug71.pdf
  • RS232Schematic.zip
    23.7 KB · Views: 8,704
Author
Val Gretchev
Views
8,620
First release
Last update
Rating
0.00 star(s) 0 ratings

More resources from Val Gretchev

Latest threads

New Articles From Microcontroller Tips

Back
Top