Instructional Objectives
After going through this lesson the student would be able to
• Distinguish between serial and parallel data communication
• Explain why a communication protocol is needed
• Distinguish between the RS-232 and other serial communication standards
• Describe how serial communication can be used to interconnect two remote computers using the telephone line
Questions & Answers
Serial Data Communication
Data Communication is one of the most challenging fields today as far as technology development is concerned. Data, essentially meaning information coded in digital form, that is, 0s and 1s, is needed to be sent from one point to the other either directly or through a network.
And when many such systems need to share the same information or different information through the same medium, there arises a need for proper organization (rather, “socialization”) of the whole network of the systems, so that the whole system works in a cohesive fashion.
Therefore, in order for a proper interaction between the data transmitter (the device needing to commence data communication) and the data receiver (the system which has to receive the data sent by a transmitter) there has to be some set of rules or (“protocols”) which all the interested parties must obey.
The requirement above finally paves the way for some DATA COMMUNICATION STANDARDS.
Depending on the requirement of applications, one has to choose the type of communication strategy. There are basically two major classifications, namely SERIAL and PARALLEL, each with its variants. The discussion about serial communication will be undertaken in this lesson.
Any data communication standard comprises
• The protocol.
• Signal/data/port specifications for the devices or additional electronic circuitry involved.
What is Serial Communication?
Serial data communication strategies and, standards are used in situations having a limitation of the number of lines that can be spared for communication. This is the primary mode of transfer in long-distance communication. But it is also the situation in embedded systems where various subsystems share the communication channel and the speed is not a very critical issue.
Standards incorporate both the software and hardware aspects of the system while buses mainly define the cable characteristics for the same communication type.
Serial data communication is the most common low-level protocol for communicating between two or more devices. Normally, one device is a computer, while the other device can be a modem, a printer, another computer, or a scientific instrument such as an oscilloscope or a function generator.
As the name suggests, the serial port sends and receives bytes of information, rather characters (used in the other modes of communication), in a serial fashion - one bit at a time. These bytes are transmitted using either a binary (numerical) format or a text format.
All the data communication systems follow some specific set of standards defined for their communication capabilities so that the systems are not Vendor specific but for each system the user has the advantage of selecting the device and interface according to his own choice of make and range.
The most common serial communication system protocols can be studied under the following categories: Asynchronous, Synchronous and Bit-Synchronous communication standards.
Asynchronous Communication and Standards
The Protocol
This protocol allows bits of information to be transmitted between two devices at an arbitrary point of time.
• The protocol defines that the data, more appropriately a “character” is sent as “frames” which in turn is a collection of bits.
• The start of a frame is identified according to a START bit(s) and a STOP bit(s) identifies the end of data frame. Thus, the START and the STOP bits are part of the frame being sent or received.
• The protocol assumes that both the transmitter and the receiver are configured in the same way, i.e., follow the same definitions for the start, stop and the actual data bits.
• Both devices, namely, the transmitter and the receiver, need to communicate at an agreed upon data rate (baud rate) such as 19,200 KB/s or 115,200 KB/s.
• This protocol has been in use for 15 years and is used to connect PC peripherals such as modems and the applications include the classic Internet dial-up modem systems.
• Asynchronous systems allow a number of variations including the number of bits in a character (5, 6, 7 or 8 bits), the number of stops bits used (1, 1.5 or 2) and an optional parity bit. Today the most common standard has 8 bit characters, with 1 stop bit and no parity and this is frequently abbreviated as '8-1-n'. A single 8-bit character, therefore, consists of 10 bits on the line, i.e., One Start bit, Eight Data bits and One Stop bit (as shown in the figure below).
• Most important observation here is that the individual characters are framed (unlike all the other standards of serial communication) and NO CLOCK data is communicated between the two ends.
The Typical Data Format (known as “FRAME”) for Asynchronous Communication
Interface Specifications for Asynchronous Serial Data Communication
The serial port interface for connecting two devices is specified by the TIA (Telecommunications Industry Association) / EIA-232C (Electronic Industries Alliance)
standard published by the Telecommunications Industry Association; both the physical and electrical characteristics of the interfaces have been detailed in these publications.
RS-232, RS-422, RS-423 and RS-485 are each a recommended standard (RS-XXX) of the Electronic Industry Association (EIA) for asynchronous serial communication and have more recently been rebranded as EIA-232, EIA-422, EIA-423 and EIA-485.
It must be mentioned here that, although, some of the more advanced standards for serial communication like the USB and FIREWIRE are being popularized these days to fill the gap for high-speed, relatively short-run, heavy-data-handling applications, but still, the above four satisfy the needs of all those high-speed and longer run applications found most often in industrial settings for plant-wide security and equipment networking.
RS-232, 423, 422 and 485 specify the communication system characteristics of the hardware such as voltage levels, terminating resistances, cable lengths, etc. The standards, however, say nothing about the software protocol or how data is framed, addressed, checked for errors or interpreted
THE RS-232
This is the original serial port interface “standard” and it stands for “Recommended Standard Number 232” or more appropriately EIA Recommended Standard 232 is the oldest and the most popular serial communication standard. It was first introduced in 1962 to help ensure connectivity and compatibility across manufacturers for simple serial data communications.
Applications
• Peripheral connectivity for PCs (the PC COM port hardware), which can range beyond modems and printers to many different handheld devices and modern scientific instruments.
All the various characteristics and definitions pertaining to this standard can be summarized according to:
• The maximum bit transfer rate capability and cable length.
• Communication Technique: names, electrical characteristics and functions of signals.
• The mechanical connections and pin assignments.
The Standard
Maximum Bit Transfer Rate, Signal Voltages and Cable Length
• RS-232’s capabilities range from the original slow data rate of up to 20 kbps to over 1 Mbps for some of the modern applications.
• RS-232 is mainly intended for short cable runs, or local data transfers in a range up to 50 feet maximum, but it must be mentioned here that it also depends on the Baud Rate.
It is a robust interface with speeds to 115,200 baud, and
• It can withstand a short circuit between any 2 pins.
• It can handle signal voltages as high / low as ±15 volts.
Signal States and the Communication Technique
Signals can be in either an active state or an inactive state. RS232 is an Active LOW voltage driven interface where:
ACTIVE STATE: An active state corresponds to the binary value 1. An active signal state can also be indicated as logic “1”, “on”, “true”, or a “mark”.
INACTIVE STATE: An inactive signal state is stated as logic “0”, “off”, “false”, or a “space”.
• For data signals, the “true” state occurs when the received signal voltage is more negative than -3 volts, while the "false" state occurs for voltages more positive than 3 volts.
• For control signals, the "true" state occurs when the received signal voltage is more positive than 3 volts, while the "false" state occurs for voltages more negative than -3 volts.
Transition or “Dead Area”
Signal voltage region in the range >-3.0V and < +3.0V is regarded as the 'dead area' and allows for absorption of noise. This same region is considered a transition region, and the signal state is undefined.
To bring the signal to the "true" state, the controlling device unasserts (or lowers) the value for data pins and asserts (or raises) the value for control pins. Conversely, to bring the signal to the "false" state, the controlling device asserts the value for data pins and unasserts the value for control pins. The "true" and "false" states for a data signal and for a control signal are as shown below.
A factor that limits the distance of reliable data transfer using RS-232 is the signaling technique that it uses.
• This interface is “single-ended” meaning that communication occurs over a SINGLE WIRE referenced to GROUND, the ground wire serving as a second wire. Over that single wire, marks and spaces are created.
• While this is very adequate for slower applications, it is not suitable for faster and longer applications.
The communication technique
• RS-232 is designed for a unidirectional half-duplex communications mode. That simply means that a transmitter (driver) is feeding the data to a receiver over a copper line. The data always follows the direction from driver to receiver over that line. If return transmission is desired, another set of driver- receiver pair and separate wires are needed. In other words, if bi-directional or full-duplex capabilities are needed, two separate communications paths are required.
Disadvantage
Being a single-ended system it is more susceptible to induced noise, ground loops and ground shifts, a ground at one end not the same potential as at the other end of the cable e.g. in applications under the proximity of heavy electrical installations and machineries But these vulnerabilities at very high data rates and for those applications a different standard, like the RS422 etc., is required which have been explained further.
Some Modern Perspectives/Advantages
Most applications for RS-232 today are for data connectivity between portable handheld devices and a PC. Some of the differences between the modern RS-232 integrals from the older versions are:
• Such devices require that the RS-232 IC to be very small, have low current drain, operate from a +3 to +5-V supply.
• They provide ESD protection on all transmit and receive pins. For example, some RS232 interfaces have specifically been designed for handheld devices and support data rates greater than 250 kbps, can operate down to +2.7 V.
• They can automatically go into a standby mode drawing very small currents of the order of only 150 nA when not in use, provide 15 kV ESD protection on data pins and are in the near-chip-scale 5 X 5 mm quad flat no-lead package. Nevertheless, for portable and handheld applications the older RS-232 is still the most popular one.
RS-422 and RS-423 (EIA Recommended Standard 422 and 423)
These were designed, specifically; to overcome the distance and speed limitations of RS232.Although they are similar to the more advanced RS-232C, but can accommodate higher baud rates and longer cable lengths and, accommodate multiple receivers.
The Standard
Maximum Bit Transfer Rate, Signal Voltages and Cable Length
• For both of these standards the data lines can be up to 4,000 feet with a data rate around 100 kbps.
• The maximum data rate is around 10 Mbps for short runs, trading off distance for speed.
• The maximum signal voltage levels are ±6 volts.
• The signaling technique for the RS-422 and RS-423 is mainly responsible for there superiority over RS-232 in terms of speed and length of transmission as explained in the next subsection.
Communication Technique
• The flair of this standard lies in its capability in tolerating the ground voltage differences between sender and receiver. Ground voltage differences can occur in electrically noisy environments where heavy electrical machinery is operating.
• The criterion here is the differential-data communication technique, also referred to as balanced-differential signaling. In this, the driver uses two wires over which the signal is transmitted. However, each wire is driven and floating separate from ground, meaning, neither is grounded and in this respect this system is different to the single-ended systems. Correspondingly, the receiver has two inputs, each floating above ground and electrically balanced with the other when no data is being transmitted. Data on the line causes a desired electrical imbalance, which is recognized and amplified by the receiver. The common-mode signals, such as induced electrical noise on the lines caused from machinery or radio transmissions, are, for the most part, canceled by the receiver. That is because the induced noise is identical on each wire and the receiver inverts the signal on one wire to place it out of phase with the other causing a subtraction to occur which results in a Zero difference. Thus, noise picked up by the long data lines is eliminated at the receiver and does not interfere with data transfer. Also, because the line is balanced and separate from ground, there is no problem associated with ground shifts or ground loops.
RS-422 – Differential Signaling, Unidirectional, Half Duplex, Multi-drop
• It may be mentioned here to avoid any ambiguity in understanding the RS-422 and the RS-423 standards, that, the standard RS-423 is an advanced counterpart of RS-422 which has been designed to tolerate the ground voltage differences between the sender and the receiver for the more advanced version of RS-232, that is, the RS-232C.
• Unlike RS-232, an RS-422 driver can service up to 10 receivers on the same line (bus). This is often referred to as a half-duplex single-source multi-drop network, (not to be confused with multi-point networks associated with RS-485), this will be explained further in conjugation with RS-485.
• Like RS-232, however, RS-422 is still half-duplex one-way data communications over a two-wire line. If bi-directional or full-duplex operation is desired, another set of driver, receiver(s) and two-wire line is needed. In which case, RS-485 is worth considering
47 videos|69 docs|65 tests
|
|
Explore Courses for Computer Science Engineering (CSE) exam
|