comp 421 cmpet 401 n.
Skip this Video
Loading SlideShow in 5 Seconds..
COMP 421 /CMPET 401 PowerPoint Presentation
Download Presentation
COMP 421 /CMPET 401

COMP 421 /CMPET 401

188 Views Download Presentation
Download Presentation

COMP 421 /CMPET 401

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript


  2. Physical Layer • Refers to transmission of unstructured bits over physical medium • Deals with characteristics of and access to the physical medium

  3. Data Link Layer • Provides for reliable transfer of information across physical link • Includes: • transmission of blocks of data (“frames”) • synchronization • error control • flow control

  4. Asynchronous & Synchronous Transmission • Timing problems require a mechanism to synchronize the transmitter and receiver • Two solutions exist • Asynchronous • Synchronous • Both methods are concerned with timing issues • How does the receiver know when the bit period begins and ends? • Small timing difference becomes more significant over time if no synchronization takes place between sender and receiver • Synchronization occurs on the data link layer

  5. Used in serial communication Data transmitted 1 character at a time Character format is usually 1 start & 1+ stop bits, plus data of 5-8 bits Character may include parity bit Timing needed only within each character Resynchronization is accomplished with each start bit Uses simple, cheap technology Wastes 20-30% of bandwidth Asynchronous Transmission

  6. Asynchronous communicationsThis is the method most widely used for PC or simple terminal serial communications. In asynch. serial communication, the electrical interface is held in the mark position between characters. The start of transmission of a character is signaled by a drop in signal level to the space level. At this point, the receiver starts its clock. After one bit time (the start bit) come 8 bits of true data followed by one or more stop bits at the mark level. The receiver tries to sample the signal in the middle of each bit time. The byte will be read correctly if the line is still in the intended state when the last stop bit is read . Thus the transmitter and receiver only have to have approximately the same clock rate. A little arithmetic will show that for a 10 bit sequence, the last bit will be interpreted correctly even if the sender and receiver clocks differ by as much as 5%. Asynch. is relatively simple, and therefore inexpensive. However, it has a high overhead, in that each byte carries at least two extra bits: a 25% loss of line bandwidth. A 56kbps line can only carry 5600 bytes/second asynchronously, in ideal conditions. Asynchronous Communications

  7. Asynchronous Character Stream 1 to 2 Stop Bits Odd Even None 5 to 8 data bits 1 Idle State Stop Bits Start Bit P Bit Next Idle State 0 • Parity bit is set so that the total number of 1’s will be even or odd, depending on which parity is set • The stop can be 1, 1.5 or 2 2 bits. It is a binary 1 and is the same as the idle state level. • This data stream is called a frame and if the receive and transmit clocks are off by toomuch • a framing errormay occur.

  8. Used in parallel communication Large blocks of bits transmitted without start/stop codes Synchronized by a clock signal or clocking data Data framed by preamble (opening)/ postamble (closing) bit patterns More efficient than asynchronous Overhead typically below 5% Used at higher speeds than asynchronous Synchronous Transmission

  9. Synchronous Frame 8-bit flag Control fields Control fields 8-bit flag Data Field • One side pulses the line regularly with one short pulse per bit time. • the other uses these pulses as a clock • Each block begins with a preamble to help synchronize the frame • other bits are added to convey control information. • The exact format of the frame depends on which data link procedure • being used (such SDLC or HDLC, etc) • Less overhead than asynchronous, but over long distances data impairments • and timing errors can become issues

  10. The synchronization problemSerial communication normally consists of transmitting binary data across an electrical or optical link such as RS232 or V.35. The data, being binary, is usually represented by two physical states. For example, +5v may represent 1 and -5v represent 0. The accurate decoding of the data at the remote end is dependent on the sender and receiver maintaining synchronization during decoding. The receiver must sample the signal in phase with the sender.If the sender and receiver were both supplied by exactly the same clock source, then transmission could take place forever with the assurance that signal sampling at the receiver was always in perfect synchronization with the transmitter. This is seldom the case, so in practice the receiver is periodically brought into synch. with the transmitter. It is left to the internal clocking accuracy of the transmitter and receiver to maintain sampling integrity between synchronization pulses. Synchronization

  11. Synchronization Choices • Low-speed terminals and PCs commonly use asynchronous transmission • inexpensive • Large systems and networks commonly use synchronous transmission • overhead too expensive; efficiency necessary • error-checking more important

  12. Isochronous Transmission • Isochronous data is synchronous data transmitted • without a clocking source • Bits are sent continuously • Timing is recovered from transitions in the data stream • Isochronous transmission is transparent • Isochronous transmission does not recognize control characters • Used mostly for secure military applications • Some new LAN standards such as ISOEthernet (Isochronous Ethernet)

  13. Pleisiochronous Transmission • Pleisiochronous data is synchronous data that carefully clocked • usually through a GPS based time source

  14. Digital Interfaces • The point at which one device connects to another • Standards define what signals are sent, and how • Some standards also define the physical connector to be used

  15. Generic Communications Interface Illustration

  16. DTE and DCE

  17. RS-232 Overview RS-232 — Defines three types of connections: electrical, functional, and mechanical. The RS-232 interface is ideal for the data-transmission range of 0–20 kbps/50 ft. (15.2 m). It employs unbalanced signaling and is usually used with DB25 connectors to interconnect DTEs (computers, controllers, etc.) and DCEs (modems, converters, etc.). Serial data exits through an RS-232 port via the Transmit Data (TD) lead and arrives at the destination device’s RS-232 port through its Receive Data (RD) lead. RS-232 is compatible with these standards: ITU V.24, V.28; ISO IS2110.

  18. EIA’s “Recommended Standard” (RS) Specifies mechanical, electrical, functional, and procedural aspects of the interface Used for connections between DTEs and voice-grade modems, and many other applications RS-232C (EIA 232C) BAUD DISTANCE (ft) 1200 1000 2400 500 4800 250 9600 150

  19. EIA-232-D • Newer version of RS-232-C adopted in 1987 • Improvements in grounding shield, test and loop-back signals • The popularity of RS-232-C in use made it difficult for EIA-232-D to enter into the marketplace

  20. V.24/EIA-232-F • ITU-T v.24 • Only specifies functional and procedural • References other standards for electrical and mechanical • EIA-232-F (USA) • Based on RS-232 • Mechanical aspects are defined by ISO 2110 • Electrical v.28 • Functional v.24 • Procedural v.24 EIA-Electronics Industries Association ITU-International Telecommunication Union ISO-International Standards Organization

  21. The standards for RS-232 and similar interfaces usually restrict RS-232 to 20kbps or less and line lengths of 15m (50 ft) or less. These restrictions are mostly throwbacks to the days when 20kbps was considered a very high line speed, and cables were thick, with high capacitance. However, in practice, RS-232 is far more robust than the traditional specified limits of 20kbps over a 15m line would imply. Most 56kbps DSUs are supplied with both V.35 and RS-232 ports because RS-232 is perfectly adequate at speeds up to 200kbps. Limits

  22. DTE / DCE If the full EIA232 standard is implemented as defined, the equipment at the far end of the connection is named the DTE device (Data Terminal Equipment, usually a computer or terminal), has a male DB25 connector, and utilizes 22 of the 25 available pins for signals or ground. Equipment at the near end of the connection (the telephone line interface) is named the DCE device (Data Circuit-terminating Equipment, usually a modem), has a female DB25 connector, and utilizes the same 22 available pins for signals and ground.

  23. The DTE Connector

  24. The DCE Connector

  25. 25-pin connector with a specific arrangement of leads DTE devices usually have male DB25 connectors while DCE devices have female In practice, fewer than 25 wires are generally used in applications Mechanical Specifications

  26. RS232 DB25 Connector • RS-232 Serial PC Port Connector DB-25 • DB-25M Function Abbreviation • Pin #1 Chassis/Frame Ground GND • Pin #2 Transmitted Data TD • Pin #3 Receive Data RD • Pin #4 Request To Send RTS • Pin #5 Clear To Send CTS • Pin #6 Data Set Ready DSR • Pin #7 Signal Ground GND • Pin #8 Data Carrier Detect DCD or CD • Pin #9 Transmit + (Current Loop) TD+ • Pin #11 Transmit - (Current Loop) TD- • Pin #18 Receive + (Current Loop) RD+ • Pin #20 Data Terminal Ready DTR • Pin #22 Ring Indicator RI • Pin #25 Receive - (Current Loop) RD-

  27. V.24/EIA-232-F • ITU-T v.24 • Only specifies functional and procedural • References other standards for electrical and mechanical • EIA-232-F (USA) • Based on RS-232 • Mechanical aspects are defined by ISO 2110 • Electrical v.28 • Functional v.24 • Procedural v.24 EIA-Electronics Industries Association ITU-International Telecommunication Union ISO-International Standards Organization

  28. DB-25 Female DB-25 Male RS-232 DB-25 Connectors DB Connector-Data Bus Connector

  29. RS-232 DB-25 Pinouts

  30. Important Pins

  31. See Table 6.1, Page 184 For the older RS-232-C standard, some of the pin definitions are: Pin NumberName (function) 2 TD (Transmitted Data) 3 RD (Received Data) 4 RS (Request to Send) 5 CS (Clear to Send) 6 DSR (Data Set Ready) 20 DTR (Data Terminal Ready) 8 CD (Carrier Detect) 21 SQ (Signal Quality detector)

  32. Only a few circuits are necessary: Signal Ground (7) Transmitted Data (2) Received Data (3) Request to Send (4) Clear to Send (5) DCE Ready (6) Received Line Signal Detector [Carrier Detect] (8) Additional circuits necessary sometimes: DTE Ready(20) Ring Indicator (22) Limited Distance Modem Example (Point-to-Point)

  33. Limited RS-232 RS-232 DB-9 Connectors

  34. Specifies signaling between DTE and DCE Uses NRZ-L encoding Voltage < -3V = binary 1 Voltage > +3V = binary 0 Voltage could be as high as  25 volts Rated for >20Kbps and <15M greater distances and rates are theoretically possible, but not necessarily wise Electrical Specifications

  35. Specifies the role of the individual circuits Data circuits in both directions allow full-duplex communication Timing signals allow for synchronous transmission (although asynchronous transmission is more common) Functional Specifications

  36. Multiple procedures are specified Simple example: exchange of asynchronous data on private line Provides means of attachment between computer and modem Specifies method of transmitting asynchronous data between devices Specifies method of cooperation for exchange of data between devices Procedural Specifications

  37. The essential feature of RS-232 is that the signals are carried as single voltages referred to a common earth on pin 7. Data is transmitted and received on pins 2 and 3 respectively. Data set ready (DSR) is an indication from the Dataset (i.e., the modem or DSU/CSU) that it is on. Similarly, DTR indicates to the Dataset that the DTE is on. Data Carrier Detect (DCD) indicates that carrier for the transmit data is on. Control Lines

  38. Pins 4 and 5 carry the RTS and CTS signals. In most situations, RTS and CTS are constantly on throughout the communication session. However where the DTE is connected to a multipoint line, RTS is used to turn carrier on the modem on and off. On a multipoint line, it is imperative that only one station is transmitting at a time. When a station wants to transmit, it raises RTS. The modem turns on carrier, typically waits a few milliseconds for carrier to stabilize, and raises CTS. The DTE transmits when it sees CTS up. When the station has finished its transmission, it drops RTS and the modem drops CTS and carrier together. Control Lines

  39. The clock signals are only used for synchronous communications. The modem or DSU extracts the clock from the data stream and provides a steady clock signal to the DTE. Note that the transmit and receive clock signals do not have to be the same, or even at the same baud rate. The auxiliary clock signal on pin 24 is supplied on in order to allow local connections without the need for a modem eliminator. The baud rate of the auxiliary clock is programmable. By jumpering this signal to pins 15 and 17 each side, you can use a simple null-modem cable for synchronous connections. This arrangement is much less expensive that using Modem Eliminator boxes to provide the cable crossover and clocking Clocks

  40. Signal Timing An acceptable pulse (top) moves through the transition region quickly and without hesitation or reversal. Defective pulses (bottom) could cause data errors. 4 - The slope of the rising and falling edges of a transition should not exceed 30v/µS. Rates higher than this may induce crosstalk in adjacent conductors of a cable.

  41. RS-232 Signals (Asynch) Even Parity Odd Parity No Parity See ASCII Table 3.1, Page 83

  42. Connection Establishment

  43. Dial Up Operation (1)

  44. Dial Up Operation (2)

  45. Dial Up Operation (3)

  46. Voltage Levels Signal State Voltage Assignments - Voltages of -3v to -25v with respect to signal ground (pin 7) are considered logic '1' (the marking condition), whereas voltages of +3v to +25v are considered logic '0' (the spacing condition). The range of voltages between -3v and +3v is considered a transition region for which a signal state is not assigned.

  47. The truth table for RS232 is: Signal > +3v = 0 Signal < -3v = 1 <-3v> The output signal level usually swings between +12v and -12v. The "dead area" between +3v and -3v is designed to absorb line noise. In the various RS-232-like definitions this dead area may vary. For instance, the definition for V.10 has a dead area from +0.3v to -0.3v. Many receivers designed for RS-232 are sensitive to differentials of 1 volt or less. Voltage Levels

  48. Asynchronous Operation

  49. Signal Timing The EIA232 standard is applicable to data rates of up to 20,000 bits per second (the usual upper limit is 19,200 baud). Fixed baud rates are not set by the EIA232 standard. However, the commonly used values are 300, 1200, 2400, 9600, and 19,200 baud. Other accepted values that are not often used are 110 (mechanical teletype machines), 600, and 4800 baud.Changes in signal state from logic '1' to logic '0' or vice versa must abide by several requirements, as follows: 1 - Signals that enter the transition region during a change of state must move through the transition region to the opposite signal state without reversing direction or reentering.2 - For control signals, the transit time through the transition region should be less than 1ms.3 - For Data and Timing signals, the transit time through the transition region should be a - less than 1ms for bit periods greater than 25ms,b - 4% of the bit period for bit periods between 25ms and 125µs,c - less than 5µs for bit periods less than 125µs.The rise and fall times of data and timing signals ideally should be equal, but in any case vary by no more than a factor of three.

  50. Only a few circuits are necessary: Signal Ground (7) Transmitted Data (2) Received Data (3) Request to Send (4) Clear to Send (5) DCE Ready (6) Received Line Signal Detector [Carrier Detect] (8) Additional circuits necessary sometimes: DTE Ready(20) Ring Indicator (22) Limited Distance Modem Example (Point-to-Point)