Tải bản đầy đủ (.pdf) (76 trang)

TRUYỀN SỐ LIỆU VÀ MẠNG Ch02 data communications

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (3.53 MB, 76 trang )

Data Communication and
Networking
Dr. –Ing. Vo Que Son
Email:

Telecomm. Dept.
Faculty of EEE

DCN
HCMUT

1


Content
Chapter 1: Medium of PHY Layer
Wired and Wireless Media
Physical layer standards: RS232, RS422, RS485
Line Coding
Digital modulation/demodulation
Channel parameters
Gaussian noise and BER

Chapter 2: Data Communications
Asynchronous transmission
Synchronous transmission
Channel Coding
Data Compression
Telecomm. Dept.
Faculty of EEE


DCN
HCMUT

2


Coding schemes
 EBCDIC (Extended Binary Coded Decimal Interchange
Code):
 Invented by IBM
 8-bit character encoding used mainly on IBM mainframe and
IBM midrange computer operating systems.

 ASCII (American Standards Committee for Information
Interchange): defined by ITU-T
 character-encoding scheme originally based on the English
alphabet that encodes 128 specified characters - the numbers 09, the letters a-z and A-Z, some basic punctuation symbols,
some control codes that originated with Teletype machines, and
a blank space - into the 7-bit binary integers.
 ASCII codes represent text in computers, communications
equipment, and other devices that use text. Most modern
character-encoding schemes are based on ASCII, though they
support many additional characters.
Telecomm. Dept.
Faculty of EEE

DCN
HCMUT

3



EBCDIC Table

 Data characters

 Control characters

Telecomm. Dept.
Faculty of EEE

DCN
HCMUT

4


ASCII Table
 Data characters
 Control characters

Telecomm. Dept.
Faculty of EEE

DCN
HCMUT

5



ASCII Table
 ASCII unprintable
characters:

Telecomm. Dept.
Faculty of EEE

DCN
HCMUT

6


Network Topology
 Bus

 Point-to point

 Star

 Multipoint

 Ring

 Mesh

Telecomm. Dept.
Faculty of EEE

DCN

HCMUT

7


Communication types
 Simplex communication is
permanent uni-directional
communication (e.g. Radio, TV)
 Half duplex: A half duplex link
can communicate in only one
direction, at a time. Two way
communication is possible, but
not simultaneously. E.g. talkback radio, Citizen Bands radio
 Full duplex communication is
two-way communication
achieved over a physical link that
has the ability to communicate in
both directions simultaneously.
E.g. Telephone system
Telecomm. Dept.
Faculty of EEE

DCN
HCMUT

8


Transmission modes

 The transmission of binary data across a link can be
accomplished in either parallel or serial mode. In parallel
mode, multiple bits are sent with each clock tick. In serial
mode, 1 bit is sent with each clock tick. While there is only one
way to send parallel data, there are three subclasses of serial
transmission: asynchronous, synchronous, and isochronous.

Telecomm. Dept.
Faculty of EEE

DCN
HCMUT

9


Parallel transmission
 Bits are transmitted in bus at the same time
 High speed over short distance
 Example: PC-printer

Telecomm. Dept.
Faculty of EEE

DCN
HCMUT

10



Serial transmission
 Bits are transmitted over one line sequentially
 Low speed over long distance
 Asynchronous and Synchronous transmission

Telecomm. Dept.
Faculty of EEE

DCN
HCMUT

11


Timing
 Timing problems require a mechanism to synchronize the
transmitter and receiver
 Timing of bits is the key!
 How can we control the timing?
System A

System B

…11010010

Telecomm. Dept.
Faculty of EEE

DCN
HCMUT


12


Asynchronous transmission
 Asynchronous here means “asynchronous at the byte level,”
but the bits are still synchronized; their durations are the
same.
 Each character of data is treated independently

Telecomm. Dept.
Faculty of EEE

DCN
HCMUT

13


Synchronous transmission
 In synchronous transmission, we send bits one after another
without start or stop bits or gaps. It is the responsibility of the
receiver to group the bits.
 For sending large blocks of data
 Control schemes
 Character-oriented
 Bit-oriented

Telecomm. Dept.
Faculty of EEE


DCN
HCMUT

14


Asynchronous Transmission
Asynchronous
Data transmitted one character at a time
5 to 8 bits
Timing only needs to be maintained within each character
Transmitter and Receiver clocks need not be in sync
Resynchronize at the beginning of each character

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
Telecomm. Dept.
Faculty of EEE

DCN

HCMUT

15


Asynchronous Transmission
Diagram
Advantages:
Simple
Cheap
Overhead of 2 or 3
bits per character
(~20%)
Good for data with
large gaps (e.g.
keyboard)
Telecomm. Dept.
Faculty of EEE

DCN
HCMUT

16


Asynchronous Transmission
 How can the receiver detect bits?
 How can the receiver receive the whole byte?
 How can the receiver receive the whole frame?


Common synchronization techniques
Bit synchronization
Byte synchronization
Frame synchronization

Telecomm. Dept.
Faculty of EEE

DCN
HCMUT

17


Asynchronous Transmission
Bit Synchronization
Clock rate at the
receiver is N times
clock rate at
transmitter
When detecting the
start bit transition,
using N/2 and N
counters to sample
bits until the end of
the character

Telecomm. Dept.
Faculty of EEE


DCN
HCMUT

18


Asynchronous Transmission
If N is larger, the
sampling is more
precise
Usually, N=16

Telecomm. Dept.
Faculty of EEE

DCN
HCMUT

19


Asynchronous Transmission
 Byte synchronization: the configuration of transmission must
be the same at the transmitter and receiver
 Start bit: 1
 Data bits: 4,5,6,7,8
 Parity bit: 0, 1 (even or odd)
 Stop bit: 1, 1.5, 2

Telecomm. Dept.

Faculty of EEE

DCN
HCMUT

20


Asynchronous Transmission
Frame synchronization:
If Blocks of printable characters
Encapsulate complete block between two special (nonprintable) transmission control characters
• STX : Start-of-text
• ETX : End-of-text

Telecomm. Dept.
Faculty of EEE

DCN
HCMUT

21


Asynchronous Transmission
If Binary data

e.g., Contents of a file
containing a compiled
program

Use of single ETX not
sufficient to indicate the
end of a file

• One of the bytes might be the
same as an ETX character

Solution: STX and ETX are
preceded by another
transmission control
character
• Data link escape (DLE)

Character or byte stuffing
Telecomm. Dept.
Faculty of EEE

DCN
HCMUT

22


Example
 DTE A transmits to DTE B a sequence of characters:

T S L DLE
 The message is transmitted in Asynchronous mode using
RS232 (8-bit data, 1 parity bit, 1 stop bit), R=1200 bps and
characters are in ASCII code

 Show the data frame? (If transmitting: T S L DLE ETX? What is
the transmitted frame?)
 Determine the time to transmit this data frame (ignoring the
processing time) and the effficiency?
DLE STX

T

S

L

DLE DLE DLE ETX

T = (9 x 11)/1200 = 82.5 ms
Telecomm. Dept.
Faculty of EEE

DCN
HCMUT

23


Synchronous Transmission
Disadvantages of Asynchronous transmission
Bit synchronization is too difficult when increasing bit
rate
High overhead


Synchronous transmission
Data has been transmitted in blocks
Two approaches
• Character-oriented
• Bit-oriented

Both use the same bit synchronization methods
Major difference is in how they achieve character &
frame synchronization
Telecomm. Dept.
Faculty of EEE

DCN
HCMUT

24


Synchronous Transmission
Bit level: Block of data transmitted without start or
stop bits
Tx and Rx clocks must be synchronized!!!

Option 1 -- Can use separate clock line
Good over short distances
Subject to impairments

Option 2 -- Embed clock signal in data
Manchester encoding
Carrier frequency (analog)


Telecomm. Dept.
Faculty of EEE

DCN
HCMUT

25


×