Top Banner
1 1 Chapter Four Making Connections
40

11 Chapter Four Making Connections. 22 Introduction Connecting peripheral devices to a computer has, in the past, been a fairly challenging task Newer.

Dec 25, 2015

Download

Documents

Jesse Ferguson
Welcome message from author
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
Page 1: 11 Chapter Four Making Connections. 22 Introduction Connecting peripheral devices to a computer has, in the past, been a fairly challenging task Newer.

11

Chapter Four

Making Connections

Page 2: 11 Chapter Four Making Connections. 22 Introduction Connecting peripheral devices to a computer has, in the past, been a fairly challenging task Newer.

22

Introduction• Connecting peripheral devices to a computer has, in

the past, been a fairly challenging task• Newer interfaces have made this task much easier• Let’s examine the interface between a computer and a

device. This interface occurs primarily at the physical layer

Chapter Four - Making Connections

Page 3: 11 Chapter Four Making Connections. 22 Introduction Connecting peripheral devices to a computer has, in the past, been a fairly challenging task Newer.

33

How do I connect peripheral devices to my computer?

•Practical Computer Literacy, 2nd edition Chapter 2

Page 4: 11 Chapter Four Making Connections. 22 Introduction Connecting peripheral devices to a computer has, in the past, been a fairly challenging task Newer.

44

Half Duplex, Full Duplex, and Simplex Connections• A half duplex connection transmits data in both

directions but in only one direction at a time• A full duplex connection transmits data in both

directions and at the same time• A simplex connection can transmit data in only one

direction

Chapter Four - Making Connections

Page 5: 11 Chapter Four Making Connections. 22 Introduction Connecting peripheral devices to a computer has, in the past, been a fairly challenging task Newer.

55

Interface Standards• There are essentially two types of standards

– Official standards, created by standards making organizations such as ITU (International Telecommunications Union), IEEE (Institute for Electrical and Electronics Engineers), EIA (Electronics Industries Association), ISO (International Organization for Standards), and ANSI (American National Standards Institute)

– De-facto standards – protocols created by other groups that are not official standards but because of their widespread use, become “almost” standards

Chapter Four - Making Connections

Page 6: 11 Chapter Four Making Connections. 22 Introduction Connecting peripheral devices to a computer has, in the past, been a fairly challenging task Newer.

66

Interface Standards

• There are four possible components to an interface standard:– Electrical component

– Mechanical component

– Functional component

– Procedural component

Chapter Four - Making Connections

Page 7: 11 Chapter Four Making Connections. 22 Introduction Connecting peripheral devices to a computer has, in the past, been a fairly challenging task Newer.

77

The Four Components

• The electrical component deals with voltages, line capacitance, and other electrical characteristics

• The mechanical component deals with items such as the connector or plug description.– Ex: size and shape of a connector, How many pins are

found on the connector? What is the pin arrangement? And so on.

Chapter Four - Making Connections

Page 8: 11 Chapter Four Making Connections. 22 Introduction Connecting peripheral devices to a computer has, in the past, been a fairly challenging task Newer.

88

The Four Components

• The functional component describes the function of each pin or circuit that is used in a particular interface

• The procedural component describes how the particular circuits are used to perform an operation

• for example, describe two circuits, such as Request to Send and Clear to Send (functional component ), the procedural component would describe how these two circuits are used so that the computer can transfer data to the peripheral, and vice versa.

Chapter Four - Making Connections

Page 9: 11 Chapter Four Making Connections. 22 Introduction Connecting peripheral devices to a computer has, in the past, been a fairly challenging task Newer.

99

Example of Interfaces

• In order to better understand the four components of an interface, let’s examine the following interface standards– USB (Universal Serial Bus) – a newer standard that is

much more powerful than EIA-232F

Chapter Four - Making Connections

Page 10: 11 Chapter Four Making Connections. 22 Introduction Connecting peripheral devices to a computer has, in the past, been a fairly challenging task Newer.

10

Universal Serial Bus (USB)

• USB is a digital interface that uses a standardized connector (plug) for all serial and parallel type devices.

• Because USB provides a digital interface, it is not necessary to convert the digital signals of the microcomputer to analog signals for transfer over a connection (conversions usually have more noise ).

• is a relatively thin, space-saving cable to which devices can be added and removed while the computer and peripheral are active (hot pluggable).

• hot plugging peripheral can simply be plugged in and turned on, and that the computer should dynamically recognize the device and establish the interface.

Page 11: 11 Chapter Four Making Connections. 22 Introduction Connecting peripheral devices to a computer has, in the past, been a fairly challenging task Newer.

11

• When using peripherals designed with a USB connector, it is also possible to connect one USB peripheral to another (instead of back to the computer) known as daisy-chaining.

• Another unique it is possible for the USB cable to provide the electrical power required to operate the peripheral.

• data transfer over a USB cable is bidirectional, but only one device—the computer or the peripheral—may transmit at one time. This makes USB another example of a half-duplex connection.

• USB 2.0 can support 480 Mbps (USB 1.0 is only 12 Mbps)• USB 3.0 is rated at 4.8 Gbps and was released in November

2008.

Universal Serial Bus (USB)

Page 12: 11 Chapter Four Making Connections. 22 Introduction Connecting peripheral devices to a computer has, in the past, been a fairly challenging task Newer.

1212

Universal Serial Bus (USB)• The USB interface defines all four components• The electrical component defines two wires VBUS and

Ground to carry a 5 volt signal, while the D+ and D- wires carry the data and signaling information

• The mechanical component of USB strictly specifies the exact dimensions of the interface’s connectors and cabling. – Four types of USB connectors are specified: a connector A, a

connector B, a mini-connector A, and a mini-connector B.

Chapter Four - Making Connections

Page 13: 11 Chapter Four Making Connections. 22 Introduction Connecting peripheral devices to a computer has, in the past, been a fairly challenging task Newer.

1313

Universal Serial Bus (USB)

Chapter Four - Making Connections

Page 14: 11 Chapter Four Making Connections. 22 Introduction Connecting peripheral devices to a computer has, in the past, been a fairly challenging task Newer.

1414

Universal Serial Bus (USB)

• The procedural component: bus and polling. • A bus is simply a high-speed connection to which multiple

devices can attach, and polling is a process in which a computer asks a peripheral if it has any data to transmit to the computer. The USB is a polled bus in which the host controller (the USB interface to the host computer) initiates all data transfers.

• USB bus recognize when a USB device has been attached or removed.

Chapter Four - Making Connections

Page 15: 11 Chapter Four Making Connections. 22 Introduction Connecting peripheral devices to a computer has, in the past, been a fairly challenging task Newer.

15

DATA LINK CONNECTIONS

• As we have seen, interface standards such as USB and consist of four components define the physical connection between a computer and a peripheral, they reside at the physical layer of the TCP/IP protocol suite.

• But In order to transmit data successfully between two points on a network, such as between a workstation and a network server, we also need to define the data link connections.

• In TCP/IP protocol suite, the definition of the data link connection is performed at the data link, or network access layer.

• duties of the data link layer from the TCP/IP protocol suite are to create a frame of data for transmission between sender and receiver, and to provide some way of checking for errors during transmission.

Page 16: 11 Chapter Four Making Connections. 22 Introduction Connecting peripheral devices to a computer has, in the past, been a fairly challenging task Newer.

1616

Asynchronous Connections

• A type of connection defined at the data link layer

• To transmit data from sender to receiver, an asynchronous connection creates a one-character package called a frame

• The sender prepares a data character for transmission, transmits that character, and then begins preparing the next data character for transmission

• Added to the front of the frame is a Start bit which is always a logic 0 informs the receiver that an incoming data frame is arriving, allows the receiver to synchronize itself to the character.

• a Stop bit always logic 1s, is added to the end of the frame

• An optional parity bit can be added which can be used to detect errors

Chapter Four - Making Connections

Page 17: 11 Chapter Four Making Connections. 22 Introduction Connecting peripheral devices to a computer has, in the past, been a fairly challenging task Newer.

1717

Asynchronous Connections

Chapter Four - Making Connections

• Figure 4-3 shows an example of the character A (in ASCII) with one start bit, one stop bit, and an even parity bit added.

Page 18: 11 Chapter Four Making Connections. 22 Introduction Connecting peripheral devices to a computer has, in the past, been a fairly challenging task Newer.

1818

Asynchronous Connections

Chapter Four - Making Connections

Page 19: 11 Chapter Four Making Connections. 22 Introduction Connecting peripheral devices to a computer has, in the past, been a fairly challenging task Newer.

19

Asynchronous connection

• Advantage: start, stop, and parity bits is simple and requires little hardware or software.

• Disadvantage: Given that seven data bits (ASCII character code set) are often combined with one start bit, one stop bit, and one parity bit, the resulting transmitted character contains three check bits and seven data bits, for a 3:7 ratio.

• 30 percent of the bits are used as check bits. not very efficient for high amounts of data transfer and, therefore, results in slow data transfers.

Page 20: 11 Chapter Four Making Connections. 22 Introduction Connecting peripheral devices to a computer has, in the past, been a fairly challenging task Newer.

2020

Asynchronous Connections

• The term asynchronous is misleading here because you must always maintain synchronization between the incoming data stream and the receiver

• Asynchronous connections maintain synchronization by using:– Frame size—Because each frame in an asynchronous connection

is one character plus a few check bits, the receiver will receive only a small amount of information at one time. not, difficult for the receiver to stay synchronized for that short of a period.

– Start bit—When the receiver recognizes the start bit, the synchronization begins.

Chapter Four - Making Connections

Page 21: 11 Chapter Four Making Connections. 22 Introduction Connecting peripheral devices to a computer has, in the past, been a fairly challenging task Newer.

2121

Synchronous Connections

• A second type of connection defined at the data link layer• the unit of transmission is a sequence of characters. This sequence of

characters may be thousands of characters in size.• A synchronous connection creates a large frame that consists of

header and trailer flags, control information, optional address information, error detection code, and data

• A synchronous connection is more elaborate but transfers data in a more efficient manner

Chapter Four - Making Connections

Page 22: 11 Chapter Four Making Connections. 22 Introduction Connecting peripheral devices to a computer has, in the past, been a fairly challenging task Newer.

2222

Synchronous Connections

Chapter Four - Making Connections

Page 23: 11 Chapter Four Making Connections. 22 Introduction Connecting peripheral devices to a computer has, in the past, been a fairly challenging task Newer.

23

Synchronous Connections

• The starting and ending sequences of the synchronous connection are called flags and are each typically 8 bits in length.

• Followed by one or more bytes of control information. This control information provides information about the enclosed data or provides status information

• The address field indicates the destination of the frame, where the frame came from, or both.

• Following the data is almost always some form of error-checking sequence, such as the cyclic checksum.

• After the error-checking sequence is the end sequence flag.

Page 24: 11 Chapter Four Making Connections. 22 Introduction Connecting peripheral devices to a computer has, in the past, been a fairly challenging task Newer.

24

Efficiency of Asynchronous Connection

• 1 start bit

• 7 data bit

• 1 parity bit

• 1 stop bit

• Efficiency:γ=7/(1+7+1+1)=7/10=70%

Page 25: 11 Chapter Four Making Connections. 22 Introduction Connecting peripheral devices to a computer has, in the past, been a fairly challenging task Newer.

25

Efficiency of Synchronous Connection

• 2 bytes of Flag (at the two ends)

• 1 byte of control field

• 2 bytes of address

• 1000 bytes of data

• 2 bytes of CRC (checksum)

• Efficiency: 1000/(2+1+2+1000+2)=99%

Page 26: 11 Chapter Four Making Connections. 22 Introduction Connecting peripheral devices to a computer has, in the past, been a fairly challenging task Newer.

2626

Isochronous Connections

• A third type of connection defined at the data link layer used to support real-time applications (usually include streaming voice, video, and music)

• The data must be delivered at just the right speed (real-time) – not too fast and not too slow

• Typically an isochronous connection must allocate resources on both ends to maintain real-time

• USB (and Firewire) can both support isochronous

Chapter Four - Making Connections

Page 27: 11 Chapter Four Making Connections. 22 Introduction Connecting peripheral devices to a computer has, in the past, been a fairly challenging task Newer.

2727

Terminal-to-Mainframe Connections

• A point-to-point connection is a direct, unshared connection between a terminal and a mainframe computer

• A multipoint connection is a shared connection between multiple terminals and a mainframe computer

• The mainframe is the primary and the terminals are the secondaries

Chapter Four - Making Connections

Page 28: 11 Chapter Four Making Connections. 22 Introduction Connecting peripheral devices to a computer has, in the past, been a fairly challenging task Newer.

2828

Terminal-to-Mainframe Connections

Chapter Four - Making Connections

Page 29: 11 Chapter Four Making Connections. 22 Introduction Connecting peripheral devices to a computer has, in the past, been a fairly challenging task Newer.

2929

Terminal-to-Mainframe Connections

• To allow a terminal to transmit data to a mainframe, the mainframe must poll the terminal

• Polling: allows only one terminal to transmit at one time• Two basic forms of polling: roll-call polling and hub polling• In roll-call polling, the mainframe polls each terminal in a round-robin fashion

– If terminals A, B, and C shared one connection, begin by polling terminal A. If A had data to send it would do so. When A was done transmitting, the primary would poll terminal B. If B had nothing to send, it would inform the primary accordingly, and the primary would poll terminal C. When terminal C was finished, the primary would return to terminal A and continue the polling process.

Chapter Four - Making Connections

Page 30: 11 Chapter Four Making Connections. 22 Introduction Connecting peripheral devices to a computer has, in the past, been a fairly challenging task Newer.

30

Terminal-to-Mainframe Connections

• In hub polling, the mainframe polls the first terminal, and this terminal passes the poll onto the next terminal– For example, after being polled by the primary, terminal A,

when it is finished responding, passes the poll to terminal B. When terminal B is finished transmitting, it passes the poll to terminal C.

– In this scenario, the primary does not need to poll each terminal separately. The process of the primary sending a poll to a terminal and waiting for a response takes time. When large amounts of data are being transmitted, this time might be significant.

Page 31: 11 Chapter Four Making Connections. 22 Introduction Connecting peripheral devices to a computer has, in the past, been a fairly challenging task Newer.

3131

Terminal-to-Mainframe Connections

Chapter Four - Making Connections

• Roll call polling

Page 32: 11 Chapter Four Making Connections. 22 Introduction Connecting peripheral devices to a computer has, in the past, been a fairly challenging task Newer.

3232

Making Computer Connections In Action

• The back panel of a personal computer has many different types of connectors, or connections:– RS-232 connectors

– USB connectors

– Parallel printer connectors

– Serial port connectors

Chapter Four - Making Connections

Page 33: 11 Chapter Four Making Connections. 22 Introduction Connecting peripheral devices to a computer has, in the past, been a fairly challenging task Newer.

3333

Making Computer Connections In Action

Chapter Four - Making Connections

Page 34: 11 Chapter Four Making Connections. 22 Introduction Connecting peripheral devices to a computer has, in the past, been a fairly challenging task Newer.

3434

Making Computer Connections In Action

• 1 and 2 – DIN connectors for keyboard and mouse• 3 – USB connectors• 4 and 6 – DB-9 connectors

– Serial connector (ex used to connect modem)• 5 – Parallel port connector (printer) • 7, 8, and 9 – audio connectors• 10-The RJ-11 connector is used to connect to a telephone

line via the built-in modem.• 11- RJ-45 connector is used to connect to an Ethernet local

area network via a built-in Ethernet network interface card. • Will Bluetooth or ??? replace these someday?

Chapter Four - Making Connections

Page 35: 11 Chapter Four Making Connections. 22 Introduction Connecting peripheral devices to a computer has, in the past, been a fairly challenging task Newer.

35

Page 36: 11 Chapter Four Making Connections. 22 Introduction Connecting peripheral devices to a computer has, in the past, been a fairly challenging task Newer.

3636

Making Computer Connections In Action

• A company wants to transfer files that are typically 700K chars in size

• If an asynchronous connection is used, each character will have a start bit, a stop bit, and maybe a parity bit

• 700,000 chars * 11 bits/char (8 bits data + start + stop + parity) = 7,700,000 bits

Chapter Four - Making Connections

Page 37: 11 Chapter Four Making Connections. 22 Introduction Connecting peripheral devices to a computer has, in the past, been a fairly challenging task Newer.

37

Example

• 1) If an asynchronous connection:

• How many bits needed to transmit 500 bytes?

• Note: totals of bits is 11 bits per byte of data when you consider 8 data bits + 1 start bit + 1 stop bit + 1 parity bit.

Page 38: 11 Chapter Four Making Connections. 22 Introduction Connecting peripheral devices to a computer has, in the past, been a fairly challenging task Newer.

3838

Making Computer Connections In Action

• If a synchronous connection is used, assume maximum payload size – 1500 bytes

• To transfer a 700K char file requires 467 1500-character (byte) frames

• Each frame will also contain 1-byte header, 1-byte address, 1-byte control, and 2-byte checksum, thus 5 bytes overhead

Chapter Four - Making Connections

Page 39: 11 Chapter Four Making Connections. 22 Introduction Connecting peripheral devices to a computer has, in the past, been a fairly challenging task Newer.

3939

Making Computer Connections In Action

• 1500 bytes payload + 5 byte overhead = 1505 byte frames

• 467 frames * 1505 bytes/frame = 716,380 bytes, or 5,731,040 bits

• Significantly less data using synchronous connection

Chapter Four - Making Connections

Page 40: 11 Chapter Four Making Connections. 22 Introduction Connecting peripheral devices to a computer has, in the past, been a fairly challenging task Newer.

40

Example

• 1) If an synchronous connection:

• The parts amount to a 1-byte header, 1-byte address, 1-byte control, and 2 byte checksum plus the original data. The maximum payload size is 1500 bytes.

• How many bits needed to transmit 500 bytes?

40