This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
1. PRESENTED BY UMAR SHUAIBU DEPARTMENT OF ELECTRICAL
ENGINEERING. SHARDA UNIVERSITY. SERIAL COMMUNICATION BUSES
2. Serial buses, is a compound word consisting of a serial and
a buses, a serial mean sequential, in order , or one-by-one. While
bus(singular for buses) is derived from latin word omnibus meaning
for all. So literally serial buses mean one-by one for all.
According to pc encyclopaedia, serial buses are shared channels
that transmit data one bit after the other over a single wire or
fibre. Serial buses are generally used in serial communication to
allow transfer of data between computer and other peripheral
devices like printer, mouse, keyboard etc. Or even connection
between one computer the other.
3. Serial communication buses are used when the data transfer
rate is low, or while the transfer of the data over a long
distance. The serial communication buses included:- a)Rs 232 b)Rs
422 c)Rs 423 d)Rs 485 e)Universal serial bus(USB) f)Serial ATA or
SATA g)Pci express. Etc We will know discuss some of these in
detail.
4. In telecommunications, RS-232(Recommended Standard 232) is
the traditional name for a series of standards for serial binary
single-ended data and control signals connecting between a DTE
(Data Terminal Equipment) and a DCE (Data Communication Equipment).
It is commonly used in computer serial port, The standard defines
the electrical characteristics and timing of signals, the meaning
of signals, and the physical size and pin-out of connectors. DTE
stands for Data Terminal Equipment, and DCE stands for Data
Communications equipment. These terms are used to indicate the
pin-out for the connectors on a device and the direction of the
signals on the pins. Your computer is a DTE device, while most
other devices such as modem and other serial devices are usually
DCE devices. Below is the diagram showing DTE and DCE.
5. When two devices have to communicate through RS232, the
sending device sends the data character by character. The bits
corresponding to the character are called data bits. The data bits
are prefixed with a bit called start bit, and suffixed with one or
two bits called stop bits. The receiving de vice decodes the data
bits using the start bit and stop bits. This mode of communication
is called asynchronous communication because no clock signal is
required. In addition to start bit and stop bits, an additional bit
called parity bit is also sent. Parity bit is used for error
detection at the receiving end. The start bit and the stop bit are
also called mark, and space respectively. This can be shown in the
diagram below.
6. RS232 standard specifies two types of connectors. They are
25-pin connector and 9-pin connector. In DB-25 connector most of
the pins are not needed for normal PC communications, and indeed,
most new PCs are equipped with male D type connectors having only 9
pins. Using a 25- pin DB-25 or 9-pin DB-9 connector, its normal
cable limitation of 50 feet can be extended to several hundred feet
with high-quality cable. RS-232 defines the purpose and signal
timing for each of the 25 lines; however, many applications use
less than a dozen. There is a standardized pin out for RS- 232 on a
DB25 connector, as shown below. DB9 connector can be converted into
DB25 using 9-DB25 converter, as all can be shown in the following
diagrams.
7. Sn . specification Rs232 1 Mode of operation Single-ended 2
Allowed number of Tx, and Rx 1-Tx, and 1-Rx 3 Maximum cable length
50 feet 4 Maximum data rate 20kbs 5 Minimum driver output range 5v
to 15v 6 Maximum driver output range 25v 7 Tx load impedence 3k to
7k 8 Rx input sensitivity 3v 9 Rx input voltage 15v 10 Maximum Rx
input resistance 3k to 7k
8. RS-232 has some serious shortcomings as an electrical
interface. Firstly, the interface presupposes a common ground
between the DTE and DCE. This is a reasonable assumption where a
short cable connects a DTE and DCE in the same room, but with
longer lines and connections between devices that may be on
different electrical busses, this may not be true. We have seen
some spectacular electrical events causes by "uncommon grounds".
Secondly, a signal on a single line is impossible to screen
effectively for noise. By screening the entire cable one can reduce
the influence of outside noise, but internally generated noise
remains a problem. As the baud rate and line length increase, the
effect of capacitance between the cables introduces serious
crosstalk until a point is reached where the data itself is
unreadable. Using low capacitance cable can reduce crosstalk.
9. When communicating at high data rates, or over long
distances in real world environments, single-ended methods are
often inadequate. Differential data transmission (balanced
differential signal) offers superior performance in most
applications. RS-422 and RS-485 were designed for high speed
communication. RS-422 is a telecommunications standard for binary
serial communications between devices. It is the protocol or
specifications that must be followed to allow two devices that
implement this standard to speak to each other. RS-422 is an
updated version of the original serial protocol known as RS-232.
Unlike Rs232, Rs422 allowed as many as 10 slave transceiver on
differential transmission line. Below are Rs422 diagrams.
10. RS-422 is a balanced four wire system. The signal sent from
the DTE device is transmitted to the DCE device through two wires
and the signal sent from the DCE device to the DTE device is
transmitted through the other two wires. The signals on each pair
of wires are the mirror opposite of each other, i.e., a "1" datum
is transmitted as a +2V reference on one wire and a -2V reference
on the other wire. To send a "0" datum, a -2V reference is
transmitted through one wire and a +2V reference on the other wire.
That is the opposite of what was done to transmit a '1' datum. This
balanced differential approach allows for much longer distances
between the DCE device and the DTE device than was possible with
the earlier 3-wire RS-232 communication standard.
11. Sn Specification Rs 422 1 Mode of operation Differential 2
Allowed number of Tx and Rx 1-Tx and 10-Rx 3 Maximum cable length
4000ft(1200m) 4 Maximum data rate 100kbs/10mbs 5 Maximum driver
output range 6v 6 Minimum driver output range 2v 7 Transmitter(Tx)
load impedance 100 8 Receiver(Rx) input sensitivity 200mV 9
Receiver(Rx) voltage range 7v 10 Maximum Rx input resistance
4k
12. Rs 232 can be converted into Rs422 for transmission using a
converter known as Rs232-Rs422 converter. Below is the Rs232-Rs422
converter
13. RS485 is a serial communication standard for multipoint
communications. It supports several types of connectors, including
DB-9 and DB-37. RS-485 is similar to RS422 but can support more
nodes per line, RS485 meets the requirements for a truly
multi-point communications network, and the standard specifies up
to 32 drivers and 32 receivers on a single (2-wire) bus. With the
introduction of "automatic" repeaters and high-impedance drivers /
receivers this "limitation" can be extended to hundreds (or even
thousands) of nodes on a network. RS-485 network can be constructed
as either a balanced 2 wire system or a 4 wire system.
14. A RS-485 network constructed as a 4 wire system, has one
node designated as the master and the remaining nodes are
designated as slaves. Communication in such a system is only
between master and slaves and never between slaves. RS485 is the
most versatile communication standard in the standard series
defined by the EIA, as it performs well on all four points. That is
why RS485 is currently a widely used communication interface in
data acquisition and control applications where multiple nodes
communicate with each other.
15. One of the main problems with RS232 is the lack of immunity
for noise on the signal lines. The transmitter and receiver compare
the voltages of the data- and handshake lines with one common zero
line.. Noise is easily picked up and limits both the maximum
distance and communication speed. With RS485 on the contrary there
is no such thing as a common zero as a signal reference. Several
volts difference in the ground level of the RS485 transmitter and
receiver does not cause any problems. The RS485 signals are
floating and each signal is transmitted over a Sig+ line and a Sig-
line. The RS485 receiver compares the voltage difference between
both lines, instead of the absolute voltage level on a signal
line.
16. This works well and prevents the existence of ground loops,
a common source of communication problems. The best results are
achieved if the Sig+ and Sig- lines are twisted. The image below
will explains why.
17. In the picture above, noise is generated by magnetic fields
from the environment. The picture shows the magnetic field lines
and the noise current in the RS485 data lines that is the result of
that magnetic field. In the straight cable, all noise current is
flowing in the same direction, practically generating a looping
current just like in an ordinary transformer. When the cable is
twisted, we see that in some parts of the signal lines the
direction of the noise current is the oposite from the current in
other parts of the cable. Because of this, the resulting noise
current is many factors lower than with an ordinary straight cable.
Hence this provide a better immunity to noise and other external
disturbance.
18. Network topology is probably the reason why RS485 is now
the favourite of the three mention interfaces in data acquisition
and control applications. RS485 is the only of the interfaces
capable of internetworking multiple transmitters and receivers in
the same network. When using the default RS485 receivers with an
input resistance of 12k it is possible to connect 32 devices to the
network. Currently available high-resistance RS485 inputs allow
this number to be expanded to 256. RS485 repeaters are also
available which make it possible to increase the number of nodes to
several thousands, spanning multiple kilometres. And that with an
interface which does not require
19. intelligent network hardware: the implementation on the
software side is not much more difficult than with RS232. It is the
reason why RS485 is so popular with computers, PLCs,
microcontrollers and intelligent sensors in scientific and
technical applications. In the picture below, the general network
topology of RS485 is shown. N nodes are connected in a multipoint
RS485 network. For higher speeds and longer lines, the termination
resistances are necessary on both ends of the line to eliminate
reflections. Use 100 resistors on both ends. The RS485 network must
be designed as one line with multiple drops, not as a star.
Although total cable length maybe shorter in a star configuration,
adequate termination is not possible anymore and signal quality may
degrade significantly.
20. Sn Specification Rs 485 1 Mode of operation Differential 2
Allowed number of Tx and Rx 32-Tx and 32-Rx 3 Maximum cable length
4000feet(1200m) 4 Maximum data rate 100Kbs/10Mbs 5 Maximum driver
output range 6V 6 Minimum driver output range 1.5V 7 Tx load
impedence 54 8 Rx input sensitivity 200mV 9 Rx input voltage range
-7V up to +12V 10 Maximum Rx input resistance 12k
21. Universal Serial Bus (USB) is a specification to establish
communication between devices and a host controller, USB has
effectively replaced a variety of interfaces such as serial and
parallel ports. USB can connect computer peripherals such as mice,
keyboards, digital cameras, printers, personal media players, flash
drives, Network Adapters, and external hard drives. For many of
those devices, USB has become the standard connection method.
Unlike the older connection standards RS-232 or Parallel port, USB
connectors also supply electric power; so many devices connected by
USB do not need a power source of their own. USB support four bus
speed, the bus speed define the rate that the information travel on
the bus, these are as follow:-
22. To send or receive data, a host initiates a USB transfer.
Each transfer uses a defined format to send data, addressing
information, error detecting bits, and status and control
information. Every USB communication (with one exception in USB
3.0) is between a host and a device. The host manages traffic on
the bus, and the device responds to communications from the host.
USB supports four transfer types: control, bulk, interrupt, and
isochronous. In a control transfer, the host sends a defined
request to the device. the host uses control transfers to request a
series of data structures called descriptors from the device. The
descriptors provide information about the devices capabilities and
help the host decide what driver to assign to the device Control
transfers have up to three stages: Setup, Data (optional), and
Status. The Setup stage contains the request. When present, the
Data stage contains data from the host or device, depending on the
request. The Status stage contains information about the success of
the transfer. Bulk transfers are the fastest on an otherwise idle
bus but have no guaranteed timing. Printers and USB virtual
COM-port data use bulk transfers
23. . Interrupt transfers have guaranteed maximum latency, or
time between transaction attempts. Mice and keyboards use interrupt
transfers. Isochronous transfers have guaranteed timing but no
error correcting. Streaming audio and video use isochronous
transfers. Purpose of the transfer. USB communications fall into
two general categories: communications that help to identify and
configure the device and communications that carry out the devices
purpose. During enumeration, the host learns about the device and
requests a configuration that prepares the device to perform its
function. And also the devices firmware responds to a series of
standard requests from the host. The device must decode the
requests, return requested information, When enumeration is
complete, the host can send and request data as needed to carry out
the devices purpose.
24. The host computer is the root node of the USB tree and
contains an implicit hub, called the root hub. A hub is a USB
function that propagates USB data to one or more ports, thereby
increasing the total number of functions that share the bus. A hub
has one connection, called an upstream port, to higher levels of
the USB tree. A hub can have any number of ports for connecting
peripheral devices and other hubs. You can connect up to 127 total
devices, including hubs, to the host computer. Below is the diagram
showing USB topology.
25. Below is an example of USB topology
26. why serial buses? 1. For transmitting over a longer
distance 2. To minimize the effect of electromagnetic interference
from the environment, particularly when transmitting over a long
distance. 3. It minimized the large number of wire need to only one
or two wires 4. For cost effectiveness 5. To allow full duplex
communication with no loss of data 6. They are simpler