Computer S y stems (159.253) ~ 1 ~Data Communications: © P.L y ons 2004 159.253 Computer Systems.

30
Computer S y stems (159.253) ~ 1 ~Data Communications: © P.L y ons 2004 159.253 Computer Systems

Transcript of Computer S y stems (159.253) ~ 1 ~Data Communications: © P.L y ons 2004 159.253 Computer Systems.

Page 1: Computer S y stems (159.253) ~ 1 ~Data Communications: © P.L y ons 2004 159.253 Computer Systems.

Computer Systems (159.253) ~ 1 ~Data Communications: © P.Lyons 2004

159.253 Computer Systems

Page 2: Computer S y stems (159.253) ~ 1 ~Data Communications: © P.L y ons 2004 159.253 Computer Systems.

Computer Systems (159.253) ~ 2 ~Data Communications: © P.Lyons 2004

Data Communications

“You see, wire telegraph is a kind of a very, very long cat.You pull his tail in New York, and his head is meowing in Los Angeles.

Do you understand this?

And radio operates in exactly the same way;you send signals here, they receive them there

The only difference isAlbert Einstein

that there is no cat”

Page 3: Computer S y stems (159.253) ~ 1 ~Data Communications: © P.L y ons 2004 159.253 Computer Systems.

Computer Systems (159.253) ~ 3 ~Data Communications: © P.Lyons 2004

TYPICAL PARAMETERS

Media

Twisted pair (wire) 16-600Mbps A few km

Coax

Fibre optic cable

Radio

Satellite

Voice grade telephone

ADSL (phone wire)

100Mbps 500m

10Gbps 1000km

10kbps – 100Mbps

100Mbps

56kbps

8Mbps 10km

Copper coreInsulator

Braided outer conductorProtective plastic covering

Low speed

High speed

high -μ glasslower -μ glass

plastic sheathing

Tanenbaum 3rd edition: 82-100

Page 4: Computer S y stems (159.253) ~ 1 ~Data Communications: © P.L y ons 2004 159.253 Computer Systems.

Computer Systems (159.253) ~ 4 ~Data Communications: © P.Lyons 2004

VARIOUS TECHNOLOGIES

Bit Encoding

Voltage levels: Inside CPU (or 3.3V or 2.8V)

RS232 (V.24) -12V

0 1

0V 5V

+12V

Current flow

20mA current generators

transmitter

transmitter

Active side Passive side

receiver+

-

Page 5: Computer S y stems (159.253) ~ 1 ~Data Communications: © P.L y ons 2004 159.253 Computer Systems.

Computer Systems (159.253) ~ 5 ~Data Communications: © P.Lyons 2004

VARIOUS TECHNOLOGIES

Bit Encoding

Voltage levels: Inside CPU (or 3.3V or 2.8V)

RS232 (V.24) -12V

0 1

0V 5V

+12V

Current flow

Direction of voltage change at clock edge

0mA 20mA

1 1 1 0 0 0 1

Page 6: Computer S y stems (159.253) ~ 1 ~Data Communications: © P.L y ons 2004 159.253 Computer Systems.

Computer Systems (159.253) ~ 6 ~Data Communications: © P.Lyons 2004

VARIOUS TECHNOLOGIES

light

Bit Encoding

Voltage levels: Inside CPU (or 3.3V or 2.8V)

RS232 (V.24) -12V

0 1

0V 5V

+12V

Current flow

Direction of voltage change at clock edge

0mA 20mA

Amplitude and frequency modulation

Light transmission dark

Page 7: Computer S y stems (159.253) ~ 1 ~Data Communications: © P.L y ons 2004 159.253 Computer Systems.

Computer Systems (159.253) ~ 7 ~Data Communications: © P.Lyons 2004

CENTRONICS INTERFACE

Works over distances of ~ 5m

Parallel Transmission

Normally between a computer and printer.

8 wires transmit a data byte+ control wires

Sender (computer)puts the correct voltages on the wireasserts a STROBE line to say that valid data is present.

Receiver (printer) receives data byte puts TRUE on ACK (acknowledgment) control line

Page 8: Computer S y stems (159.253) ~ 1 ~Data Communications: © P.L y ons 2004 159.253 Computer Systems.

Computer Systems (159.253) ~ 8 ~Data Communications: © P.Lyons 2004

Parallel cables are expensive! Generally preferable to transmit bits serially

Common local speeds:300 bps 600 bps 1200 bps 9600 bps

Serial Transmission

Serial transmission used exclusively over long distances ATMInternet

PROBLEMS WITH PARALLEL DATA PATHS

Page 9: Computer S y stems (159.253) ~ 1 ~Data Communications: © P.L y ons 2004 159.253 Computer Systems.

Computer Systems (159.253) ~ 9 ~Data Communications: © P.Lyons 2004

START AND STOP BITS

Bit Synchronisation

Receiver should sample signal in the middle of each bit

Needs to knowDuration of bits (by “agreement” between source and destination)Time when bits start and stop

Asynchronous frameIDLE

START

BIT

STOPBIT

IDLE

8 DATA BITS

20% overhead (2 bits in 10 are “administration”)

Page 10: Computer S y stems (159.253) ~ 1 ~Data Communications: © P.L y ons 2004 159.253 Computer Systems.

Computer Systems (159.253) ~ 10 ~Data Communications: © P.Lyons 2004

UART

Bit Synchronisation

(UNIVERSAL ASYNCHRONOUS RECEIVER/TRANSMITTER)

Inputs serial data

Detects 8-bit sequences surrounded by start and stop bitsDelivers these in parallel to the processor

Remembers 10-bit sequences(more if stop “bit” lasts for more than 1 bit time)

UART’s clock typically runs at 16 x serial bit rate.

UART synchronises on start bit’s hi -> lo transition

Samples incoming signal:once after 24 clock-cycles (1.5 bit times)9 times after 16 clock-cycles

Up to 7 clock cycles clock drift without loss of synchronisation

Page 11: Computer S y stems (159.253) ~ 1 ~Data Communications: © P.L y ons 2004 159.253 Computer Systems.

Computer Systems (159.253) ~ 11 ~Data Communications: © P.Lyons 2004

Can be used as an auto speed detect feature -The user generates a break signalThe remote system goes to a new bit rate and sends “login:”User stops sending Breaks when the correct message appears

Non-Data Signals

Logic 0 state > ~ 1/5 sec is interpreted as a BREAK signal.(For current loop this occurred if the wire was disconnected or broken)Length of break is not related to the transmission rate

BREAK SIGNAL

Page 12: Computer S y stems (159.253) ~ 1 ~Data Communications: © P.L y ons 2004 159.253 Computer Systems.

Computer Systems (159.253) ~ 12 ~Data Communications: © P.Lyons 2004

Light transmitted by total internal reflection at glass/glass boundaryGlass is highly transparent for 3 IR light wavelengths: 850, 1300, 1550 nm

1 encoded as a light pulse; 0 encoded as a dark period

Bit Encoding

high -μ glasslower -μ glass

plastic sheathing

high -refractive index material

low -refractive index material

Speed limit > 25,000GHz for all three frequencies Actual transmission speeds (~10GHz) limited by computer switching technology

AttenuationdB/km

Wavelength(nm)600

2

1

01000 1400 1800

FIBRE OPTIC TRANSMISSION

Page 13: Computer S y stems (159.253) ~ 1 ~Data Communications: © P.L y ons 2004 159.253 Computer Systems.

Computer Systems (159.253) ~ 13 ~Data Communications: © P.Lyons 2004

Transmitting Data over Phone Lines

Wavelength(= 1/frequency)

Phase

Sine waves

Amplitude

00 3600

MODULATION

Page 14: Computer S y stems (159.253) ~ 1 ~Data Communications: © P.L y ons 2004 159.253 Computer Systems.

Computer Systems (159.253) ~ 14 ~Data Communications: © P.Lyons 2004

Direct transmission of digital data not possibleLong sequences of 1's or 0's look like a signal with frequency 0HzFrequency for 9600bps sequences of alternating 0's and 1's > 3400Hz.

Transmitting Data over Phone Lines

400 3400

Frequency (Hz)

amplitude

Frequency range optimised for voice signals

Modulate an audio-frequency carrier signal with digital dataCarrier always above low-f cutoffTo get high data rates at <3400Hz, squeeze multiple bits into a signal element

THE TELEPHONE SYSTEM

Page 15: Computer S y stems (159.253) ~ 1 ~Data Communications: © P.L y ons 2004 159.253 Computer Systems.

Computer Systems (159.253) ~ 15 ~Data Communications: © P.Lyons 2004

logic 0 f = 1180Hz

Used for bit rates of 300bps or below.

Transmitting Data over Phone Lines

logic 1 f = 980 Hz

010=

Note: exaggerated frequency difference in this diagram

FREQUENCY MODULATION

Page 16: Computer S y stems (159.253) ~ 1 ~Data Communications: © P.L y ons 2004 159.253 Computer Systems.

Computer Systems (159.253) ~ 16 ~Data Communications: © P.Lyons 2004

Simplex- transmission only in one directionHalf-duplex - alternating transmissionFull duplex - both sides talk at once.

Transmitting Data over Phone Lines

Frequency shift keying

Full-duplex requires another pair of frequencieslogic 1 = 1650Hzlogic 0 = 1850Hz

The side that started the call is in originate mode uses the first set of frequencies (980 and 1180Hz)

The side that answers the call is in answer modeuses the second set of frequencies

FREQUENCY MODULATION

Page 17: Computer S y stems (159.253) ~ 1 ~Data Communications: © P.L y ons 2004 159.253 Computer Systems.

Computer Systems (159.253) ~ 17 ~Data Communications: © P.Lyons 2004

So we represent

as

1 0 1

Transmitting Data over Phone Lines

Used for 1200bps and above

logic 1

logic 0

00 phase angle at start of coding element(a.k.a. in-phase, or sin signal)

1800 phase angle at start of coding element(a.k.a. out-of-phase, or cos signal)

PHASE MODULATION

Page 18: Computer S y stems (159.253) ~ 1 ~Data Communications: © P.L y ons 2004 159.253 Computer Systems.

Computer Systems (159.253) ~ 18 ~Data Communications: © P.Lyons 2004

DIFFERENTIAL PHASE MODULATION

Insert a phase change between adjacent signal elementslogic 0 a 900 (1/4 cycle) phase shiftlogic 1 a 2700 (3/4 cycle) phase shift

Transmitting Data over Phone Lines

PHASE MODULATION^

But absolute phase angles are not easy to measure.

So 0100 becomes

Data is only encoded at boundaries between signalling elements Why do the the signalling elements have to be 11/2 wavelengths long?

0 1 0 0

Page 19: Computer S y stems (159.253) ~ 1 ~Data Communications: © P.L y ons 2004 159.253 Computer Systems.

Computer Systems (159.253) ~ 19 ~Data Communications: © P.Lyons 2004

Transmitting Data over Phone Lines

No of signal elements/s is called the baud rate

In our example, each bit occupies 1.5 cyclesSo 1200bps data requires 1800Hz carrierWhat is the baud rate?1200 baud

Each signal element is a “baud”After its inventor Baudot (1845-1903)

Emile Baudot

BAUD RATE

Page 20: Computer S y stems (159.253) ~ 1 ~Data Communications: © P.L y ons 2004 159.253 Computer Systems.

Computer Systems (159.253) ~ 20 ~Data Communications: © P.Lyons 2004

BAUD RATE vs. BIT RATE

For higher speedsKeep the same carrier frequency (i.e., fcarrier = 1800Hz, still)But encode more bits per signalling element

To get 2400 bps encode two bits at a time using:

00 00 phase shift01 900 shift11 1800 shift10 2700 shift

so 00 01 10 11 becomes:

Transmitting Data over Phone Lines

BAUD RATE vs. BIT RATE

00

00

01

900

10 11

18002700

carrier: 1800Hzbaud rate: 1200baudbit rate: 2400bps

BAUD RATE

Page 21: Computer S y stems (159.253) ~ 1 ~Data Communications: © P.L y ons 2004 159.253 Computer Systems.

Computer Systems (159.253) ~ 21 ~Data Communications: © P.Lyons 2004

DIFFERENTIAL PHASE CODING

Coding scheme using phase shifts can be represented by phase diagrams (or constellation charts)

Angle represents phaseRadial distance represents amplitude of carrier wave(only 1 amplitude used here)

Transmitting Data over Phone Lines

(Back to) DIFFERENTIAL PHASE ENCODING

x

x

x

x

00

01

11

10

00 00 phase shift

01 900 shift11 1800 shift10 2700 shift

Page 22: Computer S y stems (159.253) ~ 1 ~Data Communications: © P.L y ons 2004 159.253 Computer Systems.

Computer Systems (159.253) ~ 22 ~Data Communications: © P.Lyons 2004

For higher speeds, increase the number of values per signalling elementFor 4800bps, encode 3 bits per signal element at 1600 baudfcarrier = ?

QAM (QUADRATURE AMPLITUDE MODULATION)

Transmitting Data over Phone Lines

x

x

x

x

000

001

010

011

100110

111

101x

xx

x

QAM uses both phase shifts AND amplitude

V.34

2400Hz, if 1.5 cycles per signalling element

On a constellation chart, distance from the origin represents the volume of the signal elementangle represents phase shift of the signal element (w.r.t previous element)

QUADRATURE AMPLITUDE MODULATION

Page 23: Computer S y stems (159.253) ~ 1 ~Data Communications: © P.L y ons 2004 159.253 Computer Systems.

Computer Systems (159.253) ~ 23 ~Data Communications: © P.Lyons 2004

Nyquist theorem:Max bitrate = 2 x carrier frequency

= 2 x carrier frequency x log2(possible values/signal element)

Transmitting Data over Phone Lines

THEORETICAL LIMITATIONS

e.g., Max bitrate = 2 x 3000 x log2(8) = 18000bps

for voice grade lines and 8 possible values per baud

Fixed by legacy technology

Indefinitely incrementable?

In theory, perhaps. In practice, noise interferes

Theoretical Limitations

x no of bits encoded by a signalling element

Page 24: Computer S y stems (159.253) ~ 1 ~Data Communications: © P.L y ons 2004 159.253 Computer Systems.

Computer Systems (159.253) ~ 24 ~Data Communications: © P.Lyons 2004

Transmitting Data over Phone Lines

SHANNON-HARTLEY LAW takes noise into account

Max bitrate = bandwidth x log2(1 + S/N)

S/N for analogue PSTN with multiple exchanges is ~1000Depending on complexity of connection

33.3kbps modems reached this limit

Max bitrate = 3000 x log2(1000) = 30000bps

servermodem modemexchanges

Analogue PSTN

Public Switched Telephone Network

Ralph Hartley Claude Shannon

Shannon-Hartley Law

Page 25: Computer S y stems (159.253) ~ 1 ~Data Communications: © P.L y ons 2004 159.253 Computer Systems.

Computer Systems (159.253) ~ 25 ~Data Communications: © P.Lyons 2004

Transmitting Data over Phone Lines

56.6kbps modems “expect” to be used with mainly digital PSTNsonly 1 analogue link - user’s modem to local exchangeS/N ratio better than 1000In fact, they often fail to achieve 56.6kbps

HOW CAN MODEMS RUN AT 56K?

servermodem

Modern PSTN

modemexchanges

digitalanalogue

56K Modems

Page 26: Computer S y stems (159.253) ~ 1 ~Data Communications: © P.L y ons 2004 159.253 Computer Systems.

Computer Systems (159.253) ~ 26 ~Data Communications: © P.Lyons 2004

Most modems obey the (de facto standard) Hayes commands All start with AT All finish with a Return

Transmitting Data over Phone Lines

MODEM COMMANDS

ATDTxxxxxxx dials xxxxxxx using tone dialling

ATA manually answers an incoming call

ATH disconnects a call (hangs up)

ATZ resets the modem to its power-on state

ATE switches off echo of commands

ATS0=3 answer incoming calls after the 3rd ring

+++ escape sequence

switches the modem into command mode, rather than pass-through mode.

Modem Commands

Page 27: Computer S y stems (159.253) ~ 1 ~Data Communications: © P.L y ons 2004 159.253 Computer Systems.

Computer Systems (159.253) ~ 27 ~Data Communications: © P.Lyons 2004

Data Circuit Terminating Equipment

≤ 25 wires

Pin Circuit Mnemonic Function2 103 TD Transmit data3 104 RD Receive data4 105 RTS Request to send5 106 CTS Clear to send6 107 DSR Data set ready7 102 SIG Signal ground8 109 CD Carrier detect20 108 DTR Data terminal ready22 125 RI Ring indicator

Transmitting Data over Phone Lines

RS232

modem

DTE DCE

RS232

Data Terminal Equipment

RS232

Page 28: Computer S y stems (159.253) ~ 1 ~Data Communications: © P.L y ons 2004 159.253 Computer Systems.

Computer Systems (159.253) ~ 28 ~Data Communications: © P.Lyons 2004

RS232 is not meant for interconnecting DCEs directlybut is commonly used for this type of communication

Often connect CTS and DTR (or RTS) with a crossover, too

Transmitting Data over Phone Lines

RS232

Minimal RS232 connection (“Null modem”)

32

R D

TD23

TD

R D

7 7SIG SIG

205

DTRCTS5

20CTS

DTR

RS232

Page 29: Computer S y stems (159.253) ~ 1 ~Data Communications: © P.L y ons 2004 159.253 Computer Systems.

Computer Systems (159.253) ~ 29 ~Data Communications: © P.Lyons 2004

ADSLADSL

ASYNCHRONOUS DIGITAL SUBSCRIBER LINK

AsynchronousDownload speed and upload speeds differ

DigitalBecause an analogue link is transferring digital data

SubscriberUses the telephone network

Page 30: Computer S y stems (159.253) ~ 1 ~Data Communications: © P.L y ons 2004 159.253 Computer Systems.

Computer Systems (159.253) ~ 30 ~Data Communications: © P.Lyons 2004

ADSL

BASIC TECHNOLOGY

Extends the useful life of POTS copper wiresBandwidth increased from 3kHz to 1.1MHzDivided into separate frequency bands (Discrete MultiTone signalling)

Each frequency band has its own carrier, coded using QAM (2 phase values, 4 amplitudes)System adapts to S/N ratio across the frequency rangeUpload/download channel allocation variable

256 digital channels, 4kHz each; 64kHz – 1.1mHz

POTS(4kHz)

unused(19kHz)

upload channels

download channels

(in practice, 26 upstream channels)

ADSL