Professional Documents
Culture Documents
Fall 2008
Agenda
Preface Asynchronous & Synchronous transmission Error Detection & Correction Line configurations Interfacing
1. RS232 2. USB 3. Firewire IEEE1394
Home Exercises
Preface
Preface
The preceding three lectures have been primarily concerned with the attributes of data transmission, such as The characteristics of data signals and transmission media, The encoding of signals, and Transmission performance In this lecture, emphasis is shifted from data transmission to data communications
Key points
The transmission of data from one device to another across a transmission link involves cooperation and agreement between the two sides One of the most fundamental requirements is synchronization
The receiver must know the rate at which the bits are received in order to sample them at appropriate intervals so as to determine the value of each received bit
Serial transmission
Serial transmission means that data are transferred over a single signal path rather than a parallel set of lines, as it is common with I/O devices and computer signals. Signalling elements are sent along the line one at a time, which may be
Less than one bit (eg Manchester encoding) One bit (eg NRZ-L, FSK for digital and analog signals) More than one bit (eg QPSK)
In this lecture we assume one bit per signalling element unless otherwise specified
Asynchronous transmission
Data are transmitted one character at a time
A character is 5 to 8 bits in length Each character of data is treated independently Timing only needs to be maintained within each character
Each character begins with a start bit that alerts the receiver that a character is arriving The receiver samples each bit in the character and then looks for the beginning of the next character
Resynchronize with each character
This technique does not work well for large blocks of characters, which is more efficient than sending one character at a time
For large blocks, synchronous transmission is used
Asynchronous (diagram)
NRZ-L
lsb
One character
msb
NRZ-L
Asynchronous - Behavior
In a steady stream, interval between characters is uniform (length of stop element) In idle state, receiver looks for transition 1 to 0 Then samples next seven intervals (char length) Then looks for next 1 to 0 for next char Pros/Cons
Simple Cheap Overhead of 2 or 3 bits per char (~20%)
Synchronous (diagram)
Types of Errors
An error occurs when a bit is altered between transmission and reception Single bit errors
One bit altered Adjacent bits not affected Can occur in the presence of white noise
Burst errors
Length B Contiguous sequence of B bits in which first last and any number of intermediate bits in error Can be caused by impulse noise and Fading in wireless networks Effect is greater at higher data rates
Error Detection
Additional bits added by transmitter for error detection code Error detection schemes
Parity check
Value of parity bit is such that character has even (even parity) or odd (odd parity) number of ones However, if two (or any even number) of bit are inverted due to error, errors go undetected
Error Correction
Correction of detected errors usually requires data block to be retransmitted Not appropriate for wireless applications
Bit error rate is high
Lots of retransmissions
Propagation delay can be long (satellite) compared with frame transmission time
Would result in retransmission of frame in error plus many subsequent frames
10
Codeword is then transmitted Received bit string similar to transmitted but may contain errors Received codeword is then passed to FEC decoder
If no errors, original data block output Some error patterns can be detected and corrected Some error patterns can be detected but not corrected Some (rare) error patterns are not detected
Results in incorrect data output from FEC
11
Line Configurations
Line Configurations
Two characteristics that distinguish various data link configurations are
Topology Whether the link is half-duplex or full-duplex
Topology
Physical arrangement of stations on medium Point to point (ie only two stations) Multi point
Computer and terminals, Local Area Network
Half duplex
Only one station may transmit at a time Requires one data path
Full duplex
Simultaneous transmission and reception between two stations Requires two data paths (or echo canceling)
12
Traditional Configurations
Interfacing
13
Interfacing
Data processing devices (or data terminal equipment, DTE) do not (usually) include data transmission facilities
Examples of DTEs are data terminals, computers
14
Characteristics of Interface
Mechanical
Actual physical connection of DTE to DCE Connection plugs
Electrical
Voltage levels, timing, encoding
Functional
Specify the functions performed by assigning meanings to each of the interchange circuits Data, control, timing, electrical grounding
Procedural
Sequence of events for transmitting data based on the functional characteristics of the interface
15
Serial Interfaces
Serial interfaces send one bit of data at a time
Simpler than parallel interfaces
1. RS232
RS232 is the most common serial interface
Supported by almost all PCs
Goals Provide a robust communications system Easy implementation (little hardware or software) Support distances up to several meters Drawbacks Speed is limited (often to 9600 or 57600 bps) Cables and connectors are somewhat clunky USB (Universal Serial Bus) and Firewire IEEE 1394
are replacing RS232
16
GND
Male
Pin 1 2 3 4 5 6 7 8 9 Function DCD Rx Tx DTR Ground DSR RTS CTS RING
GND
Female
Pin 1 2 3 4 5 6 7 8 9 Function DCD Tx Rx DTR Ground DSR RTS CTS RING
17
RS232 Signals
RS232 Signals are NRZ-L in nature: Binary 1 is represented by -12V Binary 0 is represented by +12V When the line is IDLE, a constant high signal is sent To begin transmitting a character, send a START bit (low) Character data is usually eight bits, transmitted LSB to MSB End with one or more STOP bits (high)
+12
-12
IDLE START
8 Data Bits
STOP
IDLE
Electrical Specification
Digital signals Values interpreted as data or control, depending on circuit -12V is binary 1, +12V is binary 0 (NRZ-L) Signal rate < 20kbps Distance <15m For control, -12V is off, +12V is on
18
Functional Specification
Circuits grouped in categories
Data Control Timing Ground
Timing Issues
What if the sending and receiving clocks arent exactly the same speed? Example: Assume that the receive clock is slightly faster than the send clock START Send Rx IDLE 8 Data Bits STOP IDLE
Rx clock is synchronized at start bit Each bit is read on falling edge note how the edge creeps to the the left with each bit The clock only has to be close enough to read one character after that the clocks are re-synchronized
19
DCE asserts:
Link to remote modem DSR - Data Set Ready DCD - Data Carrier Detect
5 Tx
Rx DCD CTS 3 RTS DSR
DTE asserts:
RTS - Ready to Send
DCE asserts:
CTS - Clear to Send
1 DTR
GND Data Terminal Equipment (DTE)
DTE asserts:
Tx - Transmitted data
20
Procedural Specification
E.g. Asynchronous private line modem When turned on and ready, modem (DCE) asserts DSR (DCE ready) When DTE is ready to send data, it asserts RTS (Ready to Send)
Also inhibits receive mode in half-duplex
Modem responds when ready by asserting CTS DTE sends data (Tx) When data arrives, local modem asserts Receive Line Signal Detector and delivers data
21
Pin 6: DSR (DCE Ready) Pin 20: DTR (DTE Ready) Pin 22: Ring Indicator
Pin 3: Rx data Pin 8: Received Line Signal Detector Pin 6: DSR (DCE Ready) Pin 8: Received Line Signal Detector
22
Pin 2: Tx data Pin 4: RTS (Ready to Send) Pin 5: CTS (Clear to Send)
Pin 3: Rx data
Null Modem
If distance between devices is close enough to allow two DTEs to signal each other directly, RS-232 can be used without any DCE in between. For this scheme to work, a null-modem is needed, which interconnects leads in such a way as to fool both DTEs into thinking they are connected to modems.
23
2. USB
USB = Universal Serial Bus
Industry-led open standard
Evolution
USB 1.0 (1996) USB 1.1 (1998) USB 2.0 (2000)
PC Connectivity
USB in 1996:
Initially introduced as an incremental connector for new applications.
USB
USB Future:
The PC evolves into a simpler, easier to use appliance.
Telephony, Modem, Kyb, Mouse, Joystick, Still/ Motion Camera, Digital Audio, Backup Store, Printer, Scanner, Wireless Adaptors
Keyboard Serial Sound/Game LAN LAN Modem Port Ports Mouse Parallel SCSI Graphics Port Port Port
USB
USB
USB
Graphics Port
LAN
24
USB Introduction
Requires software layers both on the host computer and on the USB device Serial Protocol and Physical Link Hierarchy: PC is the host
Upstream points towards the host Downstream points away from the host
USB Cables
High Speed Cables
Shielded, jacketed - use twisted pair wiring Support max data rates of 12Mbps Support Cable lengths of 5m
25
USB Connectors
Connectors
4-Position with shielded housing Type A Connector connects to Upstream Ports Type B Connector connects to Downstream Ports Each USB Cable has a Type A & Type B Connector
26
Star topology
Distributed connectivity points
Host
B KeyBoard
B Mouse
B Joystick B Hub A A
B Peripheral
B Peripheral
Hubs are communication nodes that interconnect devices Peripherals controlled by the USB bus are slaves that respond to host commands Peripherals are called USB devices or functions
27
28
29
Guaranteed access to USB with bounded latency No Retries Max packet size for isochronous transfer is 1023B/frame Max isochronous bandwidth is 8.184Mbps
Windows 98
contains USB drivers for common applications
Windows NT
no USB support
Windows 2000/XP
provides USB support for common applications
30
Computer Electronics
Computers Hard-disk Printers, Scanners CDROM
USB
12Mbps
31
32
2 data paths.
Host Controller
Implements higher levels of bus protocol
33
An Example Network
More Reading
Stallings chapter 6 Web pages
ITU-T
34
Home Exercises
Review questions
How is the transmission of a single character differentiated from the transmission of the next character in asynchronous transmission? What is a major disadvantage of asynchronous transmission? How is synchronization provided for synchronous transmission? What is a parity bit? What is the CRC? Why would you expect a CRC to detect more errors than a parity bit? What is a DCE, a DTE and what are their function? Briefly outline the steps involved in dial-up operation over a telephone network. Which data transfer types are supported by USB devices and what are their functions?
35
Exercise
Suppose a file of 10kBytes is to be sent over a line at 2400bps.
a) Calculate the overhead in bytes and time in using asynchronous communication. Assume one start bit and a stop element of length 1 bit, and 8 bits to send the byte itself for each character. The 8-bit character consists of all data bits, with no parity bit. b) Calculate the overhead in bytes and time in using synchronous communication. Assume that the data are sent in frames. Each frame consists of 1000 characters of 8-bits each and an overhead of 48 control bits per frame. c) What would the answers to parts (a) and (b) be for a file of 100,000 characters? d) What would the answers to parts (a) and (b) be for the original file of 10,000 characters except at a data rate of 9600 bps?
36