Professional Documents
Culture Documents
Computer Networks
Chapter 6
Fall 2008
Agenda
• Preface
• Asynchronous & Synchronous transmission
• Error Detection & Correction
• Line configurations
• Interfacing
—1. RS232
—2. USB
—3. Firewire IEEE1394
• Home Exercises
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
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.
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
NRZ-L
lsb msb
One character
NRZ-L
NRZ-L
erroneous sample
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%)
—Overhead = start bit + stop element + parity bit
— Good for data with large gaps (keyboard)
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
—Cyclic Redundancy Check (CRC)
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)
Interfacing
Data Communications
Interfacing
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
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
+12
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
Timing Issues
What if the sending and receiving clocks aren’t exactly the same speed?
Example: Assume that the receive clock is slightly faster than the
send clock…
START
Send IDLE 8 Data Bits STOP IDLE
Rx
RS232
(Procedural Specification)
To transmit:
RS232 was designed to connect a DTE asserts:
terminal to a modem DTR – Data Terminal Ready
Computer Modem
DCE asserts:
DSR - Data Set Ready
5 Tx Tx Link to DCD - Data Carrier Detect
Rx Rx remote
DTE asserts:
DCD DCD modem
CTS CTS 4
RTS - Ready to Send
3 RTS RTS DCE asserts:
DSR DSR 2 CTS - Clear to Send
1 DTR DTR
GND GND
DTE asserts:
Data Data Tx - Transmitted data
Terminal Communications
Equipment Equipment Receiving data is automatic
(DTE) (DCE) Rx - Received data
• The person listens for another’s • A DTE listens for Received Line
voice and if nothing is heard, Signal Detector asserted by the
hangs up modem. If this circuit is not
asserted (i.e no carrier tone
comes through), the DTE will
drop DTR
Null Modem
PC Connectivity
USB in 1996:
Initially introduced as USB
an incremental
connector for new
applications. Keyboard Serial Sound/Game LAN LAN Modem
Port Ports
Mouse Parallel SCSI Graphics
USB Future: Port Port Port
appliance.
USB Cables
• High Speed Cables
—Shielded, jacketed - use twisted pair wiring
—Support max data rates of 12Mbps
—Support Cable lengths of 5m
• Low Speed cables
—Not shielded, pairs not twisted, cheaper
—Support 1.5Mbps
—Support Cable lengths of 3m
B B B
Hub
A A
B B
Peripheral Peripheral
Transfer Type
Control
• Control
—Exchange configuration, set-up and command
information between the device and the host
—CRCs are used for error checking as error-free
transmission is critical
—Re-transmission initiated when errors are detected
—Control transfer has 2 or 3 stages
• setup stage
• data stage (optional)
• status stage
Transfer Type
Interrupt
• Interrupt
—Not interrupts in normal sense!
—Unidirectional - only inputs to the host
—Small data transfers that occur infrequently
—Error checking validates the data
—Typical applications:
• Mice
• Keyboards
DVD
NIC IEEE 1394
DVCR ‘FireWire’
Modems
Mice
Keyboard USB
Joystick
• 1394 is ‘FireWire’
— Registered trademark of Apple
More Reading
• Stallings chapter 6
• Web pages
—ITU-T
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?