Download presentation

Presentation is loading. Please wait.

Published byKayla Tobin Modified over 2 years ago

1
Computer Data Communications Chapter 5 1 Serial Communications Interfaces oThe EIA RS-232D Standard oRS-232 Signal Characteristics oRS-232 Pin Assignments and Cables Null Modem Error Control oParity Check oBlock Character Check oBlock Checksum oPolynomial Codes oHamming Codes

2
Computer Data Communications Chapter 5 2 The EIA RS-232D Standard defines a range of bit rates, from 0 to 115,000 bps A range of cable lengths, and cables up to 50 feet The physical requirements for a serial interface. Provide the connectivity between the PC and the modems Other devices, such as serial printers, can be configured as DCE or DTE devices, To communicate directly between a PC and another computer

3
Computer Data Communications Chapter 5 3 Figure 1 : EIA RS-232D Interface applications

4
Computer Data Communications Chapter 5 4 RS-232 Signal Characteristics It is necessary to agree on data and control signals. Provides voltage ranges for data and control signals Figure 2 shows these ranges. Useful to hardware vendors and designer of serial ports and modems. The operation of these signals is not visible to a user

5
Computer Data Communications Chapter 5 5 RS-232 Signal Characteristics Figure 2 : EIA RS-232D Signal Levels

6
Computer Data Communications Chapter 5 6 RS-232 Pin Assignments and Cables Typical signals used, however are pins, 2, 3, 4, 5, 6, 7,8 20 and 22. A communication cable transmits the RS-232D signals to and from a serial port. Modems have a DB-25 female connectors, which requires a cable with a DB-25 male connector Most PCs standard serial ports uses DB-9 male connectors

7
Computer Data Communications Chapter 5 7 Figure 3 : EIA RE-232D pin layout and assignments

8
Computer Data Communications Chapter 5 8 Diagram of DB-9 pin assignments and how they must be communicate with a DB-25 connector at a DCE (modem).

9
Computer Data Communications Chapter 5 9 Null Modem To connect two computers using a device called a null modem or modem eliminator. A null modem, which is not a modem at all, is a cable or set of connectors designed to eliminate the need for a modem. The null modem makes each computer operate as if it were communicating with a modem. Without the addition of a null modem, the PCs cannot communicate directly.

10
Computer Data Communications Chapter 5 10 A PCs asynchronous port is communicating with an asynchronous modem. The two devices have compatible transmit and receive signals The two PC asynchronous ports are both expecting to receive and send data on the same lines. Figure 4: Computer and modem interfaces Figure 5: Incompatible DTE to DTE connection

11
Computer Data Communications Chapter 5 11 Figure 6 : Null modem connection diagram.

12
Computer Data Communications Chapter 5 12 i) Single-Bit Error ii) Burst Error Types of Error Error Detection and Correction Data can be corrupted during transmission. For reliable communication, errors must be detected and corrected.

13
Computer Data Communications Chapter 5 13 Single-Bit Error In a single-bit error, only one bit in the data unit has changed

14
Computer Data Communications Chapter 5 14 Burst Error A burst error means that 2 or more bits in the data unit have changed.

15
Computer Data Communications Chapter 5 15 Error Detection Mechanisms The two broad categories of error detection mechanisms are: Forward error control Feedback error control

16
Computer Data Communications Chapter 5 16 Forward error control Character frame contains a more comprehensive form of redundant information. So that the receiver is able to detect and correct the erroneous information. It is used in simplex communication mode and in situation where retransmission is not possible. For example: Radio broadcast in which there are many receivers for one transmission. Disadvantages: Expensive and number of additional bits (oh) increases rapidly as the number of information bits increases.

17
Computer Data Communications Chapter 5 17 Feedback error control Character frame includes only sufficient additional information for the receiver to detect errors are present and employ retransmission to request the another correct copy of the errorneous information be sent. Advantages: It is simple to use and extremely effective. Disadvantage: The multiple retransmission can reduce the throughput to a small fraction of the links capacity.

18
Computer Data Communications Chapter 5 18 Type of Error Detection i) Redundancy ii) Parity Check iii) Cyclic Redundancy Check (CRC) iv) Checksum Error detection uses the concept of redundancy, which means adding extra bits for detecting errors at the destination.

19
Computer Data Communications Chapter 5 19 Redundancy

20
Computer Data Communications Chapter 5 20 Parity Check Common in small information Common when probability of error is low Can be odd or even Only one extra bit is added In parity check, a parity bit is added to every data unit so that the total number of 1s is even or odd. With even parity, another bit is added to produce an even number of binary 1s. With odd parity, another bit is added to produce an odd number of binary 1s.

21
Computer Data Communications Chapter 5 21 Even-parity concept

22
Computer Data Communications Chapter 5 22 Example 1 Suppose the sender wants to send the word world. In ASCII the five characters are coded as The following shows the actual bits sent if EVEN parity is used

23
Computer Data Communications Chapter 5 23 Example 2 Now suppose the word world in Example 1 is received by the receiver without being corrupted in transmission The receiver counts the 1s in each character and comes up with even numbers (6, 6, 4, 4, 4). The data are accepted.

24
Computer Data Communications Chapter 5 24 Example 3 Now suppose the word world in Example 1 is corrupted during transmission The receiver counts the 1s in each character and comes up with even and odd numbers (7, 6, 5, 4, 4). The receiver knows that the data are corrupted, discards them, and asks for retransmission. Simple parity check can detect all single-bit errors. It can detect burst errors only if the total number of errors in each data unit is odd.

25
Computer Data Communications Chapter 5 25 Two-dimensional parity a.k.a BCC or 2 coordinate parity check

26
Computer Data Communications Chapter 5 26 Example 4 Suppose the following block is sent: However, it is hit by a burst noise of length 8, and some bits are corrupted When the receiver checks the parity bits, some of the bits do not follow the even-parity rule and the whole block is discarded In two-dimensional parity check, a block of bits is divided into rows and a redundant row of bits is added to the whole block.

27
Computer Data Communications Chapter Two-dimensional parity – detect multiple errors Error detected Horizontally Error not detected

28
Computer Data Communications Chapter Two-dimensional parity – correct single error Error dictated Horizontally Error detected Error corrected to 1

29
Computer Data Communications Chapter 5 29 CRC (Cyclic Redundancy Check) CRC appends a few bits to the end of the bit string The receiver performs a computation which should yield 0 for Error free message. Yield of Non 0 means there has been an error in one or more bits CRC can detect an impressive range of error but not all. 32 bits of CRC is sufficient for 12KB of messages for the Ethernet.

30
Computer Data Communications Chapter 5 30 CRC generator and checker

31
Computer Data Communications Chapter 5 31 Polynomial Codes -Provide a reliable detection scheme against error bursts -Can also provide error correction but not normally used -Also called CRC -Rules: -1. Binary information is represented as a polynomial E.g = x 5 + x 3 + x These polynomials obeys the law of algebra but addition is base2 & NO carry is generated. -i.e. -1+1=0, 1+0=1; 0+1=1; 0+0=0; -Subtraction is equivalent to addition

32
Computer Data Communications Chapter 5 32 A polynomial

33
Computer Data Communications Chapter 5 33 A polynomial representing a divisor

34
Computer Data Communications Chapter 5 34 Method: Message = G (x) CRC generating polynomial = P(x) of order n Remainder R(x) = G(x) * X n / P(x) Frame Check Sequence (FRC) = G(x) * X n + R(x) Generating polynomial

35
Computer Data Communications Chapter 5 35 Message = CRC generating polynomial = P(x) of order n Remainder R(x) = G(x) * X n / P(x) = *1000 / 1101 = 001 Frame Check Sequence (FRC) = G(x) * X n + R(x) = P(x) x 3 + x Generating polynomial

36
Computer Data Communications Chapter When the leftmost bit of the remainder is zero we must use 0000 instead of the original divisor Binary division in a CRC Generator

37
Computer Data Communications Chapter 5 37 Binary division in CRC checker Zero results means NO error

38
Computer Data Communications Chapter 5 38 Standard polynomials NamePolynomialApplication CRC-8x 8 + x 2 + x + 1ATM header CRC-10x 10 + x 9 + x 5 + x 4 + x 2 + 1ATM AAL ITU-16x 16 + x 12 + x 5 + 1HDLC ITU-32 x 32 + x 26 + x 23 + x 22 + x 16 + x 12 + x 11 + x 10 + x 8 + x 7 + x 5 + x 4 + x 2 + x + 1 LANs

39
Computer Data Communications Chapter 5 39 Example 5 It is obvious that we cannot choose x (binary 10) or x 2 + x (binary 110) as the polynomial because both are divisible by x. However, we can choose x + 1 (binary 11) because it is not divisible by x, but is divisible by x + 1. We can also choose x (binary 101) because it is divisible by x + 1 (binary division).

40
Computer Data Communications Chapter 5 40 Example 6 The CRC-12 x 12 + x 11 + x 3 + x + 1 which has a degree of 12, will detect all burst errors affecting an odd number of bits, will detect all burst errors with a length less than or equal to 12, and will detect, percent of the time, burst errors with a length of 12 or more

41
Computer Data Communications Chapter 5 41 Checksum

42
Computer Data Communications Chapter 5 42 Data unit and checksum

43
Computer Data Communications Chapter 5 43 The sender follows these steps: 1. The unit is divided into k sections, each of n bits. 2. All sections are added using ones complement to get the sum. 3. The sum is complemented and becomes the checksum. 4. The checksum is sent with the data. Data unit and checksum

44
Computer Data Communications Chapter The receiver follows these steps: 2. The unit is divided into k sections, each of n bits. 3. All sections are added using ones complement to get the sum. 4. The sum is complemented. 5. If the result is zero, the data are accepted: otherwise, rejected. Data unit and checksum

45
Computer Data Communications Chapter 5 45 Example 7 Suppose the following block of 16 bits is to be sent using a checksum of 8 bits The numbers are added using ones complement Sum Checksum The pattern sent is

46
Computer Data Communications Chapter 5 46 Example 8 Now suppose the receiver receives the pattern sent in Example 7 and there is no error When the receiver adds the three sections, it will get all 1s, which, after complementing, is all 0s and shows that there is no error Sum Complement means that the pattern is OK.

47
Computer Data Communications Chapter 5 47 Example 9 Now suppose there is a burst error of length 5 that affects 4 bits When the receiver adds the three sections, it gets Partial Sum Carry 1 Sum Complement the pattern is corrupted.

48
Computer Data Communications Chapter 5 48 (m+r+1) 2 r Data and redundancy bits (Hamming Code) Number of data bits m Number of redundancy bits r Total bits m + r

49
Computer Data Communications Chapter 5 49 r is also known as the check bit. Positions of redundancy bits in Hamming code

50
Computer Data Communications Chapter 5 50 All bit positions that are powers of two are used as parity bits. (positions 1, 2, 4, 8, 16, 32, 64, etc.) All other bit positions are for the data to be encoded. (positions 3, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 17, etc.) Each parity bit calculates the parity for some of the bits in the code word. The position of the parity bit determines the sequence of bits that it alternately checks and skips. Position 1 (n=1): skip 0 bit (0=n1), check 1 bit (n), skip 1 bit (n), check 1 bit (n), skip 1 bit (n), etc. (1,3,5,7,9,11,13,15,...) Position 2 (n=2): skip 1 bit (1=n1), check 2 bits (n), skip 2 bits (n), check 2 bits (n), skip 2 bits (n), etc. (2,3,6,7,10,11,14,15,...) Position 4 (n=4): skip 3 bits (3=n1), check 4 bits (n), skip 4 bits (n), check 4 bits (n), skip 4 bits (n), etc. (4,5,6,7,12,13,14,15,20,21,22,23,...) Position 8 (n=8): skip 7 bits (7=n1), check 8 bits (n), skip 8 bits (n), check 8 bits (n), skip 8 bits (n), etc. (8-15,24-31,40-47,...) Position 16 (n=16): skip 15 bits (15=n1), check 16 bits (n), skip 16 bits (n), check 16 bits (n), skip 16 bits (n), etc. (16-31,48-63,80-95,...) Position 32 (n=32): skip 31 bits (31=n1), check 32 bits (n), skip 32 bits (n), check 32 bits (n), skip 32 bits (n), etc. (32-63,96-127, ,...) General rule for position n: skip n1 bits, check n bits, skip n bits, check n bits... And so on. General Algorithm Hamming code

51
Computer Data Communications Chapter 5 51 Redundancy Hamming code Bit Calculations This general rule can be shown visually: Bit position Encoded data bits p1p1 p2p2 d1d1 p3p3 d2d2 d3d3 d4d4 p4p4 d5d5 d6d6 d7d7 d8d8 d9d9 d1 0 d1 1 p5p5 d1 2 d1 3 d1 4 d1 5 Parity bit coverage p1XXXXXXXXXX p2XXXXXXXXXX p3XXXXXXXXX p4XXXXXXXX p5XXXXX

52
Computer Data Communications Chapter 5 52 Redundancy Hamming Code bits calculation

53
Computer Data Communications Chapter 5 53 Example of redundancy bit calculation

54
Computer Data Communications Chapter 5 54 Error detection using Hamming code

Similar presentations

© 2016 SlidePlayer.com Inc.

All rights reserved.

Ads by Google