0% found this document useful (0 votes)
3 views34 pages

RS232_v1.0

RS-232 is a widely used serial communication standard developed by the EIA and TIA, favored for its simplicity and low hardware complexity. It operates as a full-duplex protocol with specific voltage levels and pin configurations, commonly using DB9 and DB25 connectors. Despite its limitations in speed and distance, RS-232 remains relevant in various applications, particularly in industrial automation and legacy systems.

Uploaded by

srikar katakam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views34 pages

RS232_v1.0

RS-232 is a widely used serial communication standard developed by the EIA and TIA, favored for its simplicity and low hardware complexity. It operates as a full-duplex protocol with specific voltage levels and pin configurations, commonly using DB9 and DB25 connectors. Despite its limitations in speed and distance, RS-232 remains relevant in various applications, particularly in industrial automation and legacy systems.

Uploaded by

srikar katakam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 34

RS232

Abstract

The standard was


RS-232 is a widely used
It is favored over parallel developed by the
serial communication
communication in many Electronic Industries
standard in the
applications due to easier Association (EIA) in
electronics industry,
implementation and collaboration with the
valued for its simplicity
reduced wiring Telecommunications
and low hardware
complexity. Industry Association
overhead.
(TIA).

While modern
RS-232 continues to play
The term "RS" stands for documentation may refer
a critical role in a variety
"Recommended to it as EIA/TIA-232-E, the
of industries, particularly
Standard," reflecting its term RS-232 remains the
in legacy systems,
role as a foundational more commonly
industrial automation,
guideline for serial data recognized and will be
and embedded device
communication. used throughout this
communication.
document.
Introduction

It utilizes voltage
RS232 is a full- levels of RS232 cables
duplex serial approximately +/- typically have a
communication 12V to represent length of about 15
protocol. binary data (0 or meters (50 feet).
1).

The interface is
commonly
implemented using
DB9 and DB25
connectors.
Specifications
 RS-232 is a complete standard. This means that the standard sets out to ensure
compatibility between the host and peripheral systems by specifying:
 Common voltage and signal levels
 Common pin-wiring configurations
 A minimal amount of control information between the host and peripheral
systems.
RS - 232
Cabling Single - ended
Number of Devices 1 transmit, 1 receive
Communication Mode Full duplex
Distance (Max) 50 feet at 19.2kbps
Data Rate (Max) 1Mbps
Signaling Unbalanced
Mark (data 1) -5V (min) -15V (max)
Space (data 0) 5V (min) 15V (max)
Input Level (min) ±3V
Output Current 500mA (Note that the driver ICs
normally used in PCs are limited
to 10mA)
Impedance 5kΩ (Internal)
Bus Architecture Point – to - Point
RS232 Pins

• Based on the function the pins are


classified as :
• Ground ( signal and chassis )
• Data ( transmit and receive )
• Control ( handshaking and
diagnostic )
• Timing ( clocking signals )

• RS-232 as a whole is bidirectional


but each individual wire (pin) is
unidirectional.
There are two full-duplex data channels available with the
interface.
•One channel is for primary data – actual information
•The other channel is secondary data – for diagnostic
information and handshaking signals.
The secondary channel is sometimes used as reverse of
backward channel allowing the receive DCE to
communicate with the transmit DCE while data are being
transmitted in the primary channel.
RS-232:
•This is the standard that specifies the voltage levels, signal
timing, and other technical aspects of serial
communication. It's not a connector, but a definition of the
interface itself.
DB-9:
•This is a 9-pin D-subminiature connector, commonly used in
RS-232 communication, particularly for serial ports on
computers.
DB-25:
•This is a 25-pin D-subminiature connector, also used for RS-
232, but less common than DB-9 for general serial ports. It
was originally used for many RS-232 applications, but DB-9
became more popular due to its smaller size.
RS232 Pins
• The specific functions of each of the pins are :
• 9 , 10 , 11 , 18 , 25 - unassigned
• 1 , 7 - ground
• 2 , 3 , 14 , 16 - data
• 15 , 17 , 24 - timing ( only for synchronous )
• others - control and handshake
(4, 5, 6, 8, 12, 13, 19, 20, 21, 22, 23)
RS232 DB25 Pins
RS232 DB25 Pin Description
RS232 Pin Signal Overview
RS232 DB9 Pins
RS232 DB9 PIN Functions
Pin # Signal Name Abbreviation Description
Indicates that the modem or DCE has detected a carrier
1 Carrier Detect (DCD) CD
signal from the remote device.
Used by the DTE (like a computer) to receive data from
2 Receive Data (Rx) RD
the DCE (like a modem).
3 Transmit Data (Tx) TD Used to send data from the DTE to the DCE.
Tells the modem (DCE) that the computer (DTE) is ready
4 Data Terminal Ready DTR
to communicate.
Common reference voltage for signals, also known as
5 Signal Ground / Common GND
signal ground.
6 Data Set Ready DSR Indicates the modem (DCE) is ready to communicate.
7 Request to Send RTS Signals the DTE wants to send data.
8 Clear to Send CTS Modem response allowing the DTE to transmit data.
Signals that a ringing signal is being received from the
9 Ring Indicator RI
telephone line.
How RS232 Works?
RS232 is a method (or protocol) that defines how to transfer data between two devices
using a few wires. It uses a serial transmission method where bytes of data are sent
out, one bit at a time, onto a single wire.
Basically, RS232 can transfer a single byte of data over a serial cable having between
3 to 22 signals and running at speeds from 100 to 20k baud. Common baud rates used
are 2.4k, 9.6k, 19.2k; the cable length can be up to 50ft. Higher baud rates are used
but not covered by the standard they still work though e.g. 38400, 57600 Baud (bits/s).
To transfer a block of data individual bytes are transmitted one after another. Data is
transmitted serially in one direction over a pair of wires. Data going out is labelled Tx
(indicating transmission) while data coming in is labelled Rx (indicating reception).
Crossing over Tx & Rx between the two systems lets each unit talk to the other. Each
byte can be transmitted at any time (as long as the previous byte has been
transmitted). The transmitted byte is not synchronized to the receiver - it is an
asynchronous protocol i.e. there is no clock signal. For this reason, software at each
end of the communication link must be set up in exactly the same way so that each
serial decoder chip can decode the serial data stream.
Bit Stream
At the beginning of each transmission a “start bit” is transmitted indicating to the receiver
that a byte of data is about to follow. The start bit lets the receiver synchronize to the data
bits. Once the start bit is found the receiver knows where the following bits will be as it is
given the sample period (derived from the baud rate) as part of the initialization process.
Data bits follow the start bit. There will be seven or eight data bits with the lsb transmitted
first. You can choose between seven or eight bits as ASCII is made up of the alphabet
within the first seven bits. The eighth bit (optional) extends the character set for graphical
symbols.
Note: If you use RS232 to transmit raw data (binary data) then you will need 8 data bits.
Typical Settings The “parity bit” is a crude error detection mechanism. You can use either
odd parity or even parity or none at all (in this case no parity bit is transmitted). It simply
evaluates all the data bits and for odd parity returns a logic one if there is an odd number
of data bits that are set. For even parity an even number of data bits that are set, sets the
parity bit. At the receiver the parity bit is used to tell if an error occurred during
transmission. The “stop bit” gives a period of time before the next start bit can be
transmitted. It is the opposite sense to the start bit and because of this allows the start bit
to be seen. The stop bit can be set choosing from 1, 1.5, or 2 bit periods.
How RS232 Works?
TXD TRANSMITTER
RS232 works on the two-way communication that RXD RECEIVER
exchanges data to one another. There are two
devices connected to each other, (DTE) Data RTS REQUEST TO SEND
Transmission Equipment& (DCE) Data CTS CLEAR TO SEND
Communication Equipment which has the pins GND GROUND
like TXD, RXD, and RTS& CTS. Now,
from DTE source, the RTS generates the request to
send the data. Then from the other side DCE,
the CTS, clears the path for receiving the data. After
clearing a path, it will give a signal to RTS of
the DTE source to send the signal. Then the bits are
transmitted from DTE to DCE. Now again
from DCE source, the request can be generated
by RTS and CTS of DTE sources clears the path for
receiving the data and gives a signal to send the
data. This is the whole process through which data
transmission takes place.
Handshaking
• How can a transmitter, transmits and the receiver receives data successfully. So, the
Handshaking defines, for this reason.
• Handshaking is the process which is used to transfer the signal from DTE to DCE to
make the connection before the actual transfer of data. The messaging between
transmitter & receiver can be done by handshaking.
• There are 3 types of handshaking processes named as:-
• No Handshaking
• Hardware Handshaking
• Software Handshaking
No Handshaking

• If there is no handshaking, then DCE


reads the already received data while
DTE transmits the next data. All the
received data stored in a memory
location known as receiver’s buffer.
This buffer can only store one bit so
receiver must read the memory buffer
before the next bit arrives. If the
receiver is not able to read the stored
bit in the buffer and next bit arrives
then the stored bit will be lost.
• As shown in below diagram, a receiver
was unable to read the 4th bit till the
5th bit arrival and this result overriding
of 4th bit by 5th bit and 4th bit is lost.
Hardware Handshaking
• It uses specific serial ports, i.e., RTS & CTS to control data flow.
• In this process, transmitter asks the receiver that it is ready to receive data
then receiver checks the buffer that it is empty, if it is empty then it will give
signal to the transmitter that I am ready to receive data.
• The receiver gives the signal to transmitter not to send any data while already
received data cannot be read.
• Its working process is same as above described in handshaking.
Software
Handshaking

• In this process, there are two


forms, i.e., X-ON & X-OFF. Here, ‘X’
is the transmitter.
• X-ON is the part in which it
resumes the data transmission.
• X-OFF is the part in which it
pauses the data transmission.
• It is used to control the data flow
and prevent loss during
transmission.
Pros and Cons of RS232
Pros:
• Simplicity: RS-232 is a relatively simple standard, making it easy to
implement and troubleshoot.
• Well-Established: It's a mature and widely used standard, ensuring
compatibility with a vast range of devices, especially older ones.
• Cost-Effective: RS-232 implementation is generally less expensive
compared to newer technologies like USB or Ethernet.
• Robustness: RS-232 can be more robust than some other interfaces
when dealing with electrical noise.
• Direct Device Connection: Useful for direct point-to-point
connections between devices.
Cons:

• Limited Distance: RS-232 is designed for relatively short-distance


communication, typically up to 50 feet (15 meters).
• Low Speed: Data transmission speeds are lower compared to
modern standards like USB or Ethernet.
• Susceptible to Noise: Single-ended signaling makes it more
vulnerable to noise and interference, especially over longer distances.
• Point-to-Point Only: RS-232 supports only point-to-point
connections, limiting its ability to connect multiple devices to a single
port.
• Large Connectors: DB9 or DB25 connectors can be relatively large
compared to connectors used in newer technologies.
• Voltage Levels: The higher voltage levels (+/- 5V to +/- 15V) can
complicate power supply design compared to the lower voltages used
in other interfaces.
RS-232 Advantages in Real-Time Systems :

• Predictable Timing: Due to its simplicity, RS-232 can offer more predictable
timing, which is sometimes beneficial in real-time systems where precise data
delivery is crucial.
• Direct Hardware Control: RS-232 allows for direct control of hardware
signals, which can be useful in real-time applications that require interaction
with specific hardware functions.
• Low Overhead: The protocol has relatively low overhead, which can be
advantageous in real-time systems where processing time is critical.

RS-232 Disadvantages in Real-Time Systems:

• Speed Limitations: The slow data rates of RS-232 can be a significant


bottleneck in real-time systems that need to process and transmit data
quickly.
• Distance Constraints: The distance limitations can restrict the physical
layout of a real-time system, especially if components need to be located far
Limitations of RS232
• RS-232 has several limitations including a restricted range (typically 50 feet or less),
relatively slow data transfer speeds (around 20 kilobytes per second), and
vulnerability to noise and interference due to its single-ended signaling. Additionally,
it's not well-suited for high-bandwidth applications or long-distance communication.
• These are some Limitations Which occur in RS232.
• Limited Range:RS-232 is primarily designed for short-distance communication,
with a maximum cable length often recommended to be around 50 feet. Beyond this,
signal degradation and noise can become significant issues.
• Slow Data Transfer Speeds:RS-232 operates at relatively low speeds compared to
modern protocols like USB or Ethernet. It's suitable for applications where low-speed
data transfer is adequate, but not for high-bandwidth scenarios.
• Susceptibility to Noise and Interference: RS-232 uses a single-ended signal,
making it more prone to noise and interference compared to differential signaling
methods. This can affect data integrity, especially over longer distances.
• Single-Ended Signaling: The single-ended nature of RS-232 means that the signal
is referred to a common ground. This can lead to issues with noise and ground
potential differences, particularly in longer cables.
Applications of RS232
• It is used in establishing communication between the computer and embedded
systems.
• Due to its lower costs, It plays a vital role in CNC machines and servo controllers
• Some microcontroller boards and PLC machines use RS232C.
• RS232C ports are used to communicate in headless systems in the absence of
any network connection.
• Many Computerized Numerical Control Systems contains RS232C port.
• Computer Communication: RS232 was previously used for connecting
computers to devices like modems, printers, and keyboards.
• Industrial Automation: It's still commonly used in industrial settings for
connecting devices like PLCs, sensors, and robots to control systems, as it is a
cost-effective solution.
• Medical Device Connectivity: RS232 is used for data transmission and device
control in medical equipment like X-ray machines and ultrasound devices.
•Retail and POS Systems: It connects POS terminals, scanners,
cash registers, and receipt printers in retail environments.
•Other Applications: RS232 is also used in various other
applications, including communication with GPS receivers, electronic
balances, data loggers, and laboratory instruments.
Conclusion

RS232 has played a foundational role in serial communication for


decades, particularly in industrial, embedded, and legacy systems.

Despite its limitations in speed, distance, and the number of connected


devices compared to modern interfaces like USB or Ethernet, RS232
remains relevant for specific applications due to its simplicity, reliability,
and ease of implementation.

While newer technologies have largely replaced it in consumer


electronics, RS232 continues to be a trusted standard in scenarios
where low-cost, point-to-point serial communication is sufficient.
References
• https://www.analog.com/en/resources/technical-articles
/fundamentals-of-rs232-serial-communications.html
• https://circuitdigest.com/article/rs232-serial-communic
ation-protocol-basics-specifications
• https://aquavision.tv/wp-content/uploads/2016/03/how
-RS232-Works.pdf
• https://www.geeksforgeeks.org/rs232c-for-data-transfe
r/
THANK YOU

You might also like