Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Audio Electronics
      • Battery Management
      • Brainwave
      • Electric Vehicles
      • EMI/EMC/RFI
      • Hardware Filters
      • IoT tutorials
      • Power Tutorials
      • Python
      • Sensors
      • USB
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Digital Issues
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
    • Engineering Diversity & Inclusion
    • DesignFast
  • Guest Post Guidelines
  • Advertise
  • Subscribe

RS232 (Serial Cable)

By Vikas Arora October 2, 2014

 

Before Universal Serial Bus (USB) in computers RS232 was used as a standard port for communication between different devices like printers, mouse, modems and all other type of computer peripherals and the computer. In terms of definition, RS232 can be defined as point to point communication between the Data Terminal Equipment (DTE) and Data Communication Equipment (DCE). On RS 232, 920 Kbps of data speed is achievable and the fact that it is called a serial port is that it transfers data bit by bit. RS232 comes in two different variants of D-style 9 pin and 25 pin the former is called as DB 9 connector and the later is called as DB 25 connector, however only three pins are required for communication.
 Pin Diagram of 9-pin and 25-pin RS-232 Ports
 
Fig. 1: Pin Diagram of 9-pin and 25-pin RS-232 Ports
 
Other pins present in RS 232 port are used depending upon the peripheral support. Devices like Modem utilize all the pins to achieve full handshaking capabilities. For having reliable communication, the length of cable used should be less than 50 ft. set to 9600 baud rate. To have a communication over long distance, other resources like wireless communication can also be used. Before 1997 the RS232 was termed as EIA232F, where EIA stands for “Electronic Industries Association” were it was developed but after the renewal of standards its name was replaced with RS232.
 
Pin Configuration:

 

The pin configuration and signaling taking place in RS232 is tabulated below:

  

 

     DB 9
 
DB 25
     Acronym
     Full name
     Direction
Pin 3
 Pin 2
        TXD
Transmit Data
     out
Pin 2
 Pin 3
        RXD
Receive Data
      in
Pin 7
 Pin 4
        RTS
Ready to send
     out
Pin 8
 Pin 5
        CTS
Clear to send
      in
Pin 6
 Pin 6
        DSR
Data set Ready
      In
Pin 4
 Pin 20
        DTR
Data terminal Ready
      out
Pin 1
 Pin 8
        DCD
Data Carrier Detect
       in
Pin 9
 Pin 22
        RI
Ring Indicator
       in
Pin 5
 Pin 7
        SG
Signal Ground
         –
 
The pin 3, pin 2 and pin 5 are set by hardware to transmit, receive and ground while all other pins are software controlled and can be changed. The pins described here are set according to the standards by EIA. 

 

The pin description given below is in the order of there priorities in which they are used in DB9 connector:
1). Pin 3: TXD– This pin is used to serially transmit the bits to the device connected to it. They are permanently set by the hardware
2). Pin 2: RXD– The data is received by the computer in serial order by the receive pin. It is also permanently set by the hardware.
3). Pin 7/Pin 8: RTS/CTS– The ready to send and clear to send pins are for hardware control flow. Hardware flow control is very useful when there is mismatching between the transmitter and receiver in terms of rate of speed.
4). Pin 6: DSR: Data Set Ready pin is generally utilized in devices like modem to tell computer that it is ready to take data.
5) Pin 4: DTR: The DTR is a control signal set to high-low. It tells the device to disconnect from computer.
6) Pin 1: DCD: This Data Carrier Detect is another type of pin configured by software for control signaling purpose. It is used to by computer to detect whether the device has been disconnected from it. Apart from the disconnection between computer and the device, it also detects whether the connected device has lost its other connections. For example, in a modem, computer can detect whether it has lost it connection from the phone line.
7) Pin 9: RI– As its name suggests, ring indicator indicates the computer that modem is ringing. It is a one way type of communication taking place from modem to computer.
9) Pin 5: SG– The signal ground provides ground to the over all connections. It also acts as reference point from where signals can be measured.

Step by Step working of RS232

 
Step by Step Working of RS232:
After having a brief reference of the pins and signaling let us see the working of RS232 by an example. Let us we have a modem that utilizes RS232 to communicate with computer. The processes taking place are briefly described below:
1). As the modem is connected to the computer, It (modem) sends a software based Ring Indicator (RI) signal to computer.
2). The computer gives response to the modem by sending DTR signal i.e. Data Terminal Ready. It tells modem that computer is ready to undergo communication with modem and ready to receive data.
3). Next is modem’s turn to responds to the DTR signal. This is done by sending a DSR signal (Data Set Ready) to the computer indicating that it is now ready to exchange further signaling with the computer’s DTE (Data Terminal Equipment).
4). After these necessary steps, transmission and reception of data and signals is set up on the TXD and RXD pins. In full duplex communication, both CTS and RTS pins are raised high while in half duplex mode they are utilized for handshaking necessary to control the direction.
5). When data transfer is completed, the computer incapacitate DTR signal and restrains the DCD and DSR signals. Hence the communication ends up.
 

RS232 in Real World

RS232 in Real World:
In modern computer world, RS232 has been replaced with the USB port. However there are certain devices that uses RS232 port for the communication with computer like dot matrix printers, modem etc. Most of the devices build today are not able to communicate with the RS232 world due to voltage differences between them. Thus to have serial communication it is necessary to have level conversion. This level conversion is done by using specifically designed integrated circuits (IC).
 
The RS232 IC converts the signals from rs232 port into the signals which are compatible to TTL based digital logic. It consists of amplifiers called as line drivers which improve signal strength and set the voltage levels according to receiver unit so that it does not get damaged. In this IC’s, 0 indicates high and 1 indicates low. Therefore whenever they receive signal, it is inverted from its initial state. These IC does also have an inbuilt UART (Universal Asynchronous Transmitter Receiver) which performs an overhead process transmitting and receiving the serial data.
Pin Diagram of RS232 IC
 
Fig. 2: Pin Diagram of RS232 IC
 
The asynchronous signal consists of start/stop bits as well as error detecting bits. The UART generates start/stop bits and can also detect the error in the transmission. It also acts as an intermediate between serial and parallel communication i.e. bit-wide communication and byte-wide communication. It converts byte of data into a single stream when transmitting and converts the bit of data i.e. serial data into parallel when receiving.
 
Thus now we can understand the implementation of RS232 in real world applications. But the standards defined by EIA are not usually followed, the device connected to the computer’s RS232 port may not have to utilize all the signals thus these unnecessary signals are omitted.

RS232 vs USB

RS232 vs. USB:
Nowadays, RS232 has been replaced by the Universal Serial Bus (USB). This replacement took place because first of all rs232 has many pins, and then it is again divided into male and female type connectors. Apart from its physical smartness there are other disadvantages too such as:
1). Availability:  
The USB ports due to their compact size are usually present in the modern computers. A computer may possess two to eight USB ports. On the other hand RS232 ports are too bulky and cover more space then the USB which makes it one of the reasons behind its extinction from modern world.
 
2). Connectivity:  
The RS232 comes in two configurations i.e. D-style 9 pin and 25 pin connector. Before the introduction of USB ports, the number of RS232 port available was maximum two. One for the printer or modem etc and another one for mouse etc. this limits the number of connection. While the USB ports are not just the serial ports they are bus which can be extended to connect with other USB jack. This increases connectivity of computer.
 
3).Speed:
There is a vast difference between the speeds of both the ports. The RS232 transmits by sending single bit of data over every clock cycle. The rate of clock pulses ranges from 150 to 119200. Roughly estimating, the speed provided by RS232 is approximately 10Mbps for internet usage. The USB is capable of providing up to 480Mbps (USB 2.0) of speed which is much more than the former port. However, the speed provided by the USB is generally limited by the factors such as number of devices connected to the same bus and also on the speed of the host computer.
 
4). Power:  
The USB port has an inbuilt power supply of 5 volts along with the signaling pins. The devices nowadays utilize 5 volt or less to operate. Thus, one does not need an external cord to power them, they can effectively use the power provided by the USB port. This makes the device more portable as one does not have to carry additional power cords with them. Today some mobile phones come with an additional feature of USB charging. Thus in case if there is no electricity, one can charge the phone through laptop’s USB port.
 
5). Plug and Play:
The devices working with the RS232 port has a command transfer phase to communicate with each other using UART. The computer does not know what type of device is been connected to it. The plug and play feature supported in USB port of computer. Through this feature, the computer can easily detect the device connected to it by some sort of drivers installed in computer or the device is configured to install its drivers automatically as it is connected to the computer. Thus one could just plug the device and play with it. Such as, one could see the plug and play feature in many mobile phones, where computer itself detects the type of phone.
Conclusion: 
Thus we came up with old day’s technology of RS232 port. These ports were introduced in 60’s when there were no operating systems and computers were operated on the command line instruction. At that time these ports acted as USB ports. Since the technology is changing revolutionary and the power requirement for working of devices is becoming less day by day. But there are many fields were this old pal of computer is still utilized effectively such as industrial sectors, laboratories because USB requires complex algorithm to set up. Also RS232 port is much cheaper than the USB and switching from old technology to newer may not be that economic in certain cases.      

 


Filed Under: Tutorials
Tagged With: cable, rs232
 

Next Article

← Previous Article
Next Article →

Questions related to this article?
👉Ask and discuss on EDAboard.com and Electro-Tech-Online.com forums.



Tell Us What You Think!! Cancel reply

You must be logged in to post a comment.

EE TECH TOOLBOX

“ee
Tech Toolbox: 5G Technology
This Tech Toolbox covers the basics of 5G technology plus a story about how engineers designed and built a prototype DSL router mostly from old cellphone parts. Download this first 5G/wired/wireless communications Tech Toolbox to learn more!

EE Learning Center

EE Learning Center
“engineers
EXPAND YOUR KNOWLEDGE AND STAY CONNECTED
Get the latest info on technologies, tools and strategies for EE professionals.

HAVE A QUESTION?

Have a technical question about an article or other engineering questions? Check out our engineering forums EDABoard.com and Electro-Tech-Online.com where you can get those questions asked and answered by your peers!


RSS EDABOARD.com Discussions

  • How best to synchronise the UCC38C45?
  • unknown component z1
  • CMOS ring oscillator
  • Self-powered Current Transducer Buyer's Guide
  • Question on options of set_clock_group

RSS Electro-Tech-Online.com Discussions

  • Fixing board, Easy question HEX SCHMITT
  • Can I make two inputs from one??
  • Display TFT ST7789 (OshonSoft Basic).
  • Home Smoke detectors are all Beeping Batteries are not dead.???
  • The Analog Gods Hate Me

Featured – LoRa/LoRaWan Series

  • What is the LoRaWAN network and how does it work?
  • Understanding LoRa architecture: nodes, gateways, and servers
  • Revolutionizing RF: LoRa applications and advantages
  • How to build a LoRa gateway using Raspberry Pi
  • How LoRa enables long-range communication
  • How communication works between two LoRa end-node devices

Recent Articles

  • How to monitor temperature and humidity on a TFT display with graphics
  • Tria modules integrate edge AI processing with multi-core processors
  • pSemi introduces RF switch with 52 dBm PMAX,PEAK and 90-dBm IIP3 linearity
  • XP Power launches 1.3 kW power supply with 58.9 W/cm³ density
  • How to enable Wi-Fi provisioning in ESP32-based IoT products

EE ENGINEERING TRAINING DAYS

engineering

Submit a Guest Post

submit a guest post
Engineers Garage
  • Analog IC TIps
  • Connector Tips
  • Battery Power Tips
  • DesignFast
  • EDABoard Forums
  • EE World Online
  • Electro-Tech-Online Forums
  • EV Engineering
  • Microcontroller Tips
  • Power Electronic Tips
  • Sensor Tips
  • Test and Measurement Tips
  • 5G Technology World
  • Subscribe to our newsletter
  • About Us
  • Contact Us
  • Advertise

Copyright © 2025 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy

Search Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Audio Electronics
      • Battery Management
      • Brainwave
      • Electric Vehicles
      • EMI/EMC/RFI
      • Hardware Filters
      • IoT tutorials
      • Power Tutorials
      • Python
      • Sensors
      • USB
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Digital Issues
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
    • Engineering Diversity & Inclusion
    • DesignFast
  • Guest Post Guidelines
  • Advertise
  • Subscribe