Serial buses

umargaro 4,372 views 38 slides Jul 05, 2014
Slide 1
Slide 1 of 38
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37
Slide 38
38

About This Presentation

serial communication buses


Slide Content

PRESENTED BY UMAR SHU’AIBU DEPARTMENT OF ELECTRICAL ENGINEERING. SHARDA UNIVERSITY. SERIAL COMMUNICATION BUSES

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. 1.0.0 INTRODUCTION

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.

1.0.1 Serial communication bus connecting peripheral to the computer.

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. 1.1.0 Rs 232 communication bus.

1.1.1 Diagram showing DTE and DCE equipment.

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. 1.2.0 Rs232 communication parameters

1.2.1 Data frame

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. 1.3.0 Rs 232 connectors

1.3.1 DB-25 pins connector diagram

1.3.2 DB-9 pins connector diagram.

1.3.3 9-DB25 pins converter diagram.

1.4.0 Specification of Rs232 communication bus 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 Ω

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. 1.5.0 Limitation of Rs232

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. 2.0.0 Rs422 communication bus

2.0.1 Master and 1- slaves transceiver diagram

2.0.2 Master and 4-slave diagram

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. 2.1.0 Operational principle

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 Ω 2.2.0 Specification of Rs422 communication bus

Rs 232 can be converted into Rs422 for transmission using a converter known as Rs232-Rs422 converter. Below is the Rs232-Rs422 converter

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. 3.0.0 Rs 485 communication bus

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.

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.   3.1.0 Differential signal with Rs485

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.

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.

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 3.2.0 Network topology with Rs485

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.

3.2.1 Diagram showing network topology of Rs485

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 Ω 3.3.0 Specification of Rs485 bus

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:- 4.0.0 Universal serial bus(USB)

super speed - 5Gb/s(supported by USB 3.0) High Speed – 480 Mb/s (USB 2.0) Full Speed – 12 Mb/s (USB 1.1) Low Speed – 1.5 Mb/s.(USB 1.0) Below is the pin diagram of the USB

T o 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 device’s 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 4.1.0 USB data transfer

. 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 device’s purpose. During enumeration, the host learns about the device and requests a configuration that prepares the device to perform its function. And also the device’s 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 device’s purpose.  

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. 4.1.1 USB Topology

Below is an example of USB topology

why serial buses? For transmitting over a longer distance To minimize the effect of electromagnetic interference from the environment, particularly when transmitting over a long distance. It minimized the large number of wire need to only one or two wires For cost effectiveness To allow full duplex communication with no loss of data They are simpler

THANK YOU
Tags