Computer S y stems ( ) ~ 1 ~Data Communications: © P.L y ons Computer Systems
Computer S y stems ( ) ~ 2 ~Data Communications: © P.L y ons 2004 D ata C ommunications “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 is Albert Einstein that there is no cat”
Computer S y stems ( ) ~ 3 ~Data Communications: © P.L y ons 2004 T YPICAL P ARAMETERS M edia Twisted pair (wire)16-600MbpsA few km Coax Fibre optic cable Radio Satellite Voice grade telephone ADSL (phone wire) 100Mbps500m 10Gbps1000km 10kbps – 100Mbps 100Mbps 56kbps 8Mbps10km Copper core Insulator Braided outer conductor Protective plastic covering Low speed High speed high- μ glass lower- μ glass plastic sheathing Tanenbaum 3 rd edition:
Computer S y stems ( ) ~ 4 ~Data Communications: © P.L y ons 2004 V ARIOUS T ECHNOLOGIES B it E ncoding Voltage levels: Inside CPU (or 3.3V or 2.8V) RS232 (V.24) -12V 01 0V5V +12V Current flow 20mA current generators transmitter Active sidePassive side receiver + -
Computer S y stems ( ) ~ 5 ~Data Communications: © P.L y ons 2004 V ARIOUS T ECHNOLOGIES B it E ncoding Voltage levels: Inside CPU (or 3.3V or 2.8V) RS232 (V.24) -12V 01 0V5V +12V Current flow Direction of voltage change at clock edge 0mA 20mA
Computer S y stems ( ) ~ 6 ~Data Communications: © P.L y ons 2004 V ARIOUS T ECHNOLOGIES light B it E ncoding Voltage levels: Inside CPU (or 3.3V or 2.8V) RS232 (V.24) -12V 01 0V5V +12V Current flow Direction of voltage change at clock edge 0mA 20mA Amplitude and frequency modulation Light transmission dark
Computer S y stems ( ) ~ 7 ~Data Communications: © P.L y ons 2004 C ENTRONICS I NTERFACE Works over distances of ~ 5m P arallel T ransmission Normally between a computer and printer. 8 wires transmit a data byte + control wires Sender (computer) puts the correct voltages on the wire asserts a STROBE line to say that valid data is present. Receiver (printer) receives data byte puts TRUE on ACK (acknowledgment) control line
Computer S y stems ( ) ~ 8 ~Data Communications: © P.L y ons 2004 Parallel cables are expensive! Generally preferable to transmit bits serially Common local speeds: 300 bps 600 bps 1200 bps 9600 bps S erial T ransmission Serial transmission used exclusively over long distances ATM Internet P ROBLEMS W ITH P ARALLEL D ATA P ATHS
Computer S y stems ( ) ~ 9 ~Data Communications: © P.L y ons 2004 S TART A ND S TOP B ITS B it S ynchronisation Receiver should sample signal in the middle of each bit Needs to know Duration of bits (by “agreement” between source and destination) Time when bits start and stop Asynchronous frame IDLE START BIT STOP BIT IDLE 8 DATA BITS 20% overhead (2 bits in 10 are “administration”)
Computer S y stems ( ) ~ 10 ~Data Communications: © P.L y ons 2004 UART B it S ynchronisation (U NIVERSAL A SYNCHRONOUS R ECEIVER/ T RANSMITTER) Inputs serial data Detects 8-bit sequences surrounded by start and stop bits Delivers 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
Computer S y stems ( ) ~ 11 ~Data Communications: © P.L y ons 2004 Can be used as an auto speed detect feature - The user generates a break signal The remote system goes to a new bit rate and sends “login:” User stops sending Breaks when the correct message appears N on -D ata S ignals 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 B REAK S IGNAL
Computer S y stems ( ) ~ 12 ~Data Communications: © P.L y ons 2004 Light transmitted by total internal reflection at glass/glass boundary Glass is highly transparent for 3 IR light wavelengths: 850, 1300, 1550 nm 1 encoded as a light pulse; 0 encoded as a dark period B it E ncoding high- μ glass lower- μ 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 Attenuation dB/km Wavelength(nm) F IBRE O PTIC T RANSMISSION
Computer S y stems ( ) ~ 13 ~Data Communications: © P.L y ons 2004 T ransmitting D ata o ver P hone L ines Wavelength (= 1/frequency) Phase Sine waves Amplitude M ODULATION
Computer S y stems ( ) ~ 14 ~Data Communications: © P.L y ons 2004 Direct transmission of digital data not possible Long sequences of 1's or 0's look like a signal with frequency 0Hz Frequency for 9600bps sequences of alternating 0's and 1's > 3400Hz. T ransmitting D ata o ver P hone L ines Frequency (Hz) amplitude Frequency range optimised for voice signals Modulate an audio-frequency carrier signal with digital data Carrier always above low-f cutoff To get high data rates at <3400Hz, squeeze multiple bits into a signal element T HE T ELEPHONE S YSTEM
Computer S y stems ( ) ~ 15 ~Data Communications: © P.L y ons 2004 logic 0f = 1180Hz Used for bit rates of 300bps or below. T ransmitting D ata o ver P hone L ines logic 1f = 980 Hz 010= Note: exaggerated frequency difference in this diagram F REQUENCY M ODULATION
Computer S y stems ( ) ~ 16 ~Data Communications: © P.L y ons 2004 Simplex- transmission only in one direction Half-duplex- alternating transmission Full duplex- both sides talk at once. T ransmitting D ata o ver P hone L ines Frequency shift keying Full-duplex requires another pair of frequencies logic 1 = 1650Hz logic 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 mode uses the second set of frequencies F REQUENCY M ODULATION
Computer S y stems ( ) ~ 17 ~Data Communications: © P.L y ons 2004 So we represent as 101 T ransmitting D ata o ver P hone L ines Used for 1200bps and above logic 1 logic phase angle at start of coding element (a.k.a. in-phase, or sin signal) phase angle at start of coding element (a.k.a. out-of-phase, or cos signal) P HASE M ODULATION
Computer S y stems ( ) ~ 18 ~Data Communications: © P.L y ons 2004 D IFFERENTIAL P HASE M ODULATION Insert a phase change between adjacent signal elements logic 0 a 90 0 ( 1 / 4 cycle) phase shift logic 1 a ( 3 / 4 cycle) phase shift T ransmitting D ata o ver P hone L ines P HASE M ODULATION ^ 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 1 1 / 2 wavelengths long? 010 0
Computer S y stems ( ) ~ 19 ~Data Communications: © P.L y ons 2004 T ransmitting D ata o ver P hone L ines No of signal elements/s is called the baud rate In our example, each bit occupies 1.5 cycles So 1200bps data requires 1800Hz carrier What is the baud rate ? 1200 baud Each signal element is a “baud” After its inventor Baudot ( ) Emile Baudot B AUD R ATE
Computer S y stems ( ) ~ 20 ~Data Communications: © P.L y ons 2004 B AUD R ATE vs. B IT R ATE For higher speeds Keep the same carrier frequency (i.e., f carrier = 1800Hz, still) But encode more bits per signalling element To get 2400 bpsencode two bits at a time using: phase shift shift shift shift so becomes: T ransmitting D ata o ver P hone L ines B AUD R ATE vs. B IT R ATE carrier: 1800Hz baud rate: 1200baud bit rate: 2400bps B AUD R ATE
Computer S y stems ( ) ~ 21 ~Data Communications: © P.L y ons 2004 DIFFERENTIAL PHASE CODING Coding scheme using phase shifts can be represented by phase diagrams (or constellation charts) Angle represents phase Radial distance represents amplitude of carrier wave (only 1 amplitude used here) T ransmitting D ata o ver P hone L ines (Back to) D IFFERENTIAL P HASE E NCODING x x x x phase shift shift shift shift
Computer S y stems ( ) ~ 22 ~Data Communications: © P.L y ons 2004 For higher speeds, increase the number of values per signalling element For 4800bps, encode 3 bits per signal element at 1600 baud f carrier = ? QAM ( Q UADRATURE A MPLITUDE M ODULATION ) T ransmitting D ata o ver P hone L ines x x x x x xx x QAM uses both phase shifts AND amplitude V Hz, if 1.5 cycles per signalling element On a constellation chart, distance from the origin represents the volume of the signal element angle represents phase shift of the signal element (w.r.t previous element) QUADRATURE AMPLITUDE MODULATION
Computer S y stems ( ) ~ 23 ~Data Communications: © P.L y ons 2004 Nyquist theorem: Max bitrate = 2 x carrier frequency = 2 x carrier frequency x log 2 (possible values/signal element) T ransmitting D ata o ver P hone L ines T HEORETICAL L IMITATIONS e.g., Max bitrate = 2 x 3000 x log 2 (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
Computer S y stems ( ) ~ 24 ~Data Communications: © P.L y ons 2004 T ransmitting D ata o ver P hone L ines S HANNON- H ARTLEY L AW takes noise into account Max bitrate = bandwidth x log 2 (1 + S/N) S/N for analogue PSTN with multiple exchanges is ~1000 Depending on complexity of connection 33.3kbps modems reached this limit Max bitrate= 3000 x log 2 (1000) = 30000bps servermodem exchanges Analogue PSTN Public Switched Telephone Network Ralph HartleyClaude Shannon Shannon-Hartley Law
Computer S y stems ( ) ~ 25 ~Data Communications: © P.L y ons 2004 T ransmitting D ata o ver P hone L ines 56.6kbps modems “expect” to be used with mainly digital PSTNs only 1 analogue link - user’s modem to local exchange S/N ratio better than 1000 In fact, they often fail to achieve 56.6kbps H OW C AN M ODEMS R UN A T 56K? server modem Modern PSTN modemexchanges digital analogue 56K Modems
Computer S y stems ( ) ~ 26 ~Data Communications: © P.L y ons 2004 Most modems obey the ( de facto standard) Hayes commands All start with AT All finish with a Return T ransmitting D ata o ver P hone L ines M ODEM C OMMANDS ATDTxxxxxxxdials xxxxxxx using tone dialling ATAmanually answers an incoming call ATHdisconnects a call (hangs up) ATZresets the modem to its power-on state ATEswitches off echo of commands ATS0=3answer incoming calls after the 3rd ring +++escape sequence switches the modem into command mode, rather than pass-through mode. Modem Commands
Computer S y stems ( ) ~ 27 ~Data Communications: © P.L y ons 2004 Data Circuit Terminating Equipment ≤ 25 wires PinCircuitMnemonicFunction 2103TDTransmit data 3104RDReceive data 4105RTSRequest to send 5106CTSClear to send 6107DSRData set ready 7102SIGSignal ground 8109CDCarrier detect 20108DTRData terminal ready 22125RIRing indicator T ransmitting D ata o ver P hone L ines RS232 modem DTE DCE RS232 Data Terminal Equipment RS232
Computer S y stems ( ) ~ 28 ~Data Communications: © P.L y ons 2004 RS232 is not meant for interconnecting DCEs directly but is commonly used for this type of communication Often connect CTS and DTR (or RTS) with a crossover, too T ransmitting D ata o ver P hone L ines RS232 Minimal RS232 connection (“Null modem”) 3 2 R D T D 2 3 T D R D 77 SIG 20 5 DTR CTS5 20 CTS DTR RS232
Computer S y stems ( ) ~ 29 ~Data Communications: © P.L y ons 2004 ADSL A SYNCHRONOUS D IGITAL S UBSCRIBER L INK Asynchronous Download speed and upload speeds differ Digital Because an analogue link is transferring digital data Subscriber Uses the telephone network
Computer S y stems ( ) ~ 30 ~Data Communications: © P.L y ons 2004 ADSL B ASIC T ECHNOLOGY Extends the useful life of POTS copper wires Bandwidth increased from 3kHz to 1.1MHz Divided into separate frequency bands (D iscrete M ulti T one s ignalling ) Each frequency band has its own carrier, coded using QAM (2 phase values, 4 amplitudes) System adapts to S/N ratio across the frequency range Upload/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