DSC (Digital Security Controls) is a world leader in electronic security. Since the company’s genesis, the experts at DSC have been leading the way. From our revolutionary control panels, to our industry-leading IP alarm monitoring products and now to our sleek, contemporary self-contained wireless panels, DSC has always been front and center.
![]() ![]()
RS232 defines the signals connecting between DTE and DCE. Here, DTE stands for Data Terminal Equipment and an example for DTE is a computer. DCE stands for Data Communication Equipment or Data Circuit Terminating Equipment and an example for DCE is a modem.RS232 was introduced in 1960’s and was originally known as EIA Recommended Standard 232. RS232 is one of the oldest serial communication standards with ensured simple connectivity and compatibility across different manufacturers. Originally, the DTEs in RS32 are electromechanical typewriters and DCEs are modems.RS232 uses serial communication, where one bit of data is sent at a time along a single data line. This is contrast to parallel communication, where multiple bits of data are sent at a time using multiple data lines.The advantage of using serial communication over parallel communication is the number of wires required to make a full duplex data transmission will be very less (two wires are sufficient without considering electrical lines). Table of Contents.What is RS232?Officially, the RS232 standard is called EIA/TIA – 232 and is defined as the interface between a DTE and a DCE devices employing serial binary data interchange.
RS232 is considered to be a appropriate standard. This is because RS232 ensures that there is no conflict between the DTE and DCE devices by specifying:. Electrical Specifications. Mechanical Specifications. Functional Specifications and.
Procedural SpecificationsAll these specifications provide us different parameters like common voltage levels, signal levels, pin wiring specifications, control data between the host device and its peripheral etc. Let us see about the different specifications in detail.
Electrical CharacteristicsThe electrical characteristics of RS232 defines the specifications related to voltage levels, line impedance and rate of change of signal levels. Voltage LevelsRS232 was defined way before TTL logic and hence, it is not unexpected that RS232 doesn’t use the TTL specific 5V and GND logic levels.The logic ‘1’ in RS232 is described as being in the voltage range of -15V to -3V and logic ‘0’ is described as the voltage range of +3V to +15V i.e.
Low level voltage is logic ‘1’ and high level voltage is logic ‘0’.Typically, the logic ‘1’ in RS232 will be -12V and logic ‘0’ will be +12V. All the above mentioned voltages are with respect to a common ground ‘GND’ pin.
Any voltage between -3V and +3V is considered to be an undefined logic state.Historically, logic ’1’ (-15V to -3V) is referred to as Marking and logic ‘0’ (+3V to +15V) is referred to as Spacing.Slew RateThe other important electrical characteristic is the rate of change of signal levels i.e. The Slew Rate. The maximum slew rate in RS232 is limited to 30V/µs. Also, a maximum bit rate of 20 Kbps is also defined.These limitations of the standard help in reducing the cross – talk with adjacent signals. Line ImpedanceThe line impedance i.e. Impedance of the wire between the DTE and DCE devices is specified to be around 3Ω to 7Ω.Also, the original RS232 standard specifies the maximum length of the cable as 15 meters but the revised standards specify the maximum length in terms of capacitance per unit length.
Mechanical SpecificationsThe Mechanical Specifications of RS232 covers the mechanical interface of the standard. The RS232 standard specifies a 25 – pin D – Type connector to support the full functionality of RS232.The following image shows a DB25 Connector. The DTE device uses a female outer casing with male pins and the DCE device uses a male outer casing with female pins.There are three types of signals in RS232.
They are data, control and ground. The following table shows the list of pins, their direction in communication along with their signal type.As the electronic equipment and devices are getting smaller, we do not have room for larger connector like DB25 and most common applications do not require all the 25 pins in the connector. Hence, a reduced function 9 – pin connector is used commonly.The 9 – pin connector is called as DE-9 (often wrongly called as DB-9) and it is a D – Type subminiature (D- Sub) connector. The following image shows the DE-9 male and female connectors.The pins in DE-9 connector, their names and description are given in the following table.Functional SpecificationsSince RS232 is considered a complete standard, it defines more than electrical and mechanical characteristics. RS232 standard also defines the functions of different signals used in the interface.The signals are classified as: Common, Data, Timing and Control Signals.
Procedural SpecificationsThe Procedural Specifications of RS232 specify the sequence of operations that must be carried out when a DTE and DCE are connected.Assume a computer (DTE) is connected to a Modem (DCE) through RS232 interface. In order to send data from computer to Modem, the following procedure must be followed. When Modem (DCE) is ready to receive, it will send a DCE ready signal. When the computer (DTE) is ready to send the data, it sends a Ready to Send (RTS) signal. The Modem (DCE) then sends a Clear to Send (CTS) signal to indicate that data can be sent by computer (DTE). Finally, the Computer (DTE) sends data on Transmit Data (TD) line to the Modem (DCE).NOTE: This is not an exact procedure but similar to the actual one.
Practical Implementation of RS232The voltage levels of RS232 are very different from most of the systems designed today. Hence, we need a level converter of some sorts to implement RS232 interface. This job is performed by dedicated level converter ICs like MAX232 by Maxim Integrated for example.These ICs take in the RS232 signals and generate a TTL level voltages. These ICs also invert the signals as low voltage levels in RS232 are logic ‘1’ and high voltage levels in RS232 are logic ‘0’. The following image shows the implementation of RS232 Driver in a real time application.Here, the UART (Universal Asynchronous Receiver Transmitter) generates and receives the necessary signals for serial communication and the RS232 Driver is responsible for converting signals between TTL and RS232 interface.The communication system mentioned in this example is of asynchronous type and it requires synchronization bits i.e.
Start and Stop and error checking bit i.e. The UART in the above example is responsible for generating the Start, Stop and Parity bits when transmitting the data and also detecting errors while receiving data.The following image illustrates a typical RS232 application between a Computer and a Modem. Here, the PC or Computer is the DTE and the Modem is the DCE.The Computer and Modem communicate with each other using RS232 interface and the communication between the modems is established using telecommunication links.How RS232 Works?In RS232, the data is transmitted serially in one direction over a single data line.
In order to establish two way communication, we need at least three wires (RX, TX and GND) apart from the control signals. A byte of data can transmitted at any time provided the previous byte has already been transmitted.RS232 follows asynchronous communication protocol i.e. There is no clock signal to synchronize transmitter and receiver. Hence, it uses start and stop bits to inform the receiver when to check for data.There is a delay of certain time between the transmissions of each bit. This delay is nothing but an inactive state i.e.
The signal is set to logic ‘1’ i.e.12V (if you remember, logic ‘1’ in RS232 is -12V and logic ‘0’ is +12V).First, the transmitter i.e. The DTE sends a Start bit to the receiver i.e. The DCE to inform it that data transmission starts from next bit. The Start bit is always ‘0’ i.e. The next 5 to 9 characters are data bits.If parity bit is used, a maximum of 8 bits can be transmitted. If parity isn’t used, then 9 data bits can be transmitted. After the data is transmitted, the transmitter sends the stop bits.
It can be either 1 bit or 1.5 bits or 2 bits long. The following image shows the frame format of the RS232 protocol.Though RS232 is considered to be a complete standard, many manufacturers may not abide by the standards.
Some manufacturers may implement the complete specifications and some implement just a partial specification.The reason behind this variation in implementation of the RS232 standard is that not all devices and applications require the full specifications and functionality of the RS232 Protocol. For example, a serial Modem using RS232 may require more control lines than a serial Mouse using serial port.Then how does the Transmitter and Receiver, which might use different set of specifications, successfully transmit or receive the data? A process called Handshaking is used for this purpose. HandshakingHandshaking is a process of dynamically setting the parameters of a communication between the transmitter and receiver before the communication begins.The need for handshaking is dictated by the speed at with the transmitter (DTE) transmits the data, the speed at which the receiver (DCE) receives the data and the rate at which the data is transmitted.In an asynchronous data transmission system, there can be no handshaking, hardware handshaking and software handshaking. No HandshakingIf handshaking is not used, then the receiver (DCE) must read the data that is already received by it before the transmitter (DTE) sends the next data. For this, the receiver uses a special memory location called Buffer and since it is used at receiver end, it is called Receiver Buffer.The received data is stored in the buffer before it is read by the receiver. The Receiver Buffer can typically store a single bit of data and this data must be cleared (read) before the next data arrives and if it is not cleared, the existing data will be overwritten with the new data.The following image shows a typical transmission and reception of data using transmitter and receiver buffers.
In this setup, the receiver has successfully read the first three bits of data but did not read the fourth bit. Hence, the next bit i.e.
The fifth bit will overwrite the fourth bit and the fourth bit is lost.To avoid situations like this, we need some sort of Handshaking mechanism (either Software or Hardware Handshaking). Hardware HandshakingIn Hardware Handshaking, the transmitter first asks the receiver whether it is ready to receive the data. The receiver then checks its buffer and if the buffer is empty, it will then tell the transmitter that it is ready to receive.The transmitter will transmit the data and it is loaded into the receiver buffer.
![]() Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
March 2023
Categories |