1
Serial Communication
EIA RS232, RS422 and RS485
Recommended Standard 232
The purpose of this course note is to attempt to describe the main elements in Serial
Communication. This application note attempts to cover enough technical details of
RS232, RS422 and RS485.
EIA - Electroonic Industries Association
Must be a Sender and Receiver
A protocol is a set of rules which governs the transfer of data between
computers. Protocols allow communication between computers and networks.
Handshaking is used to establish which protocols to use. Handshaking
controls the flow of data between computers
Protocols will determine the speed of transmission, error checking method,
size of bytes, and whether synchronous or asynchronous
Examples of protocols are: RS-232, TCP/IP, ....
Characteristics of Communication
Systems
5 Basic Components
Every communication system has 5 basic requirements
•Data Source (where the data originates)
•Transmitter (device used to transmit data)
•Transmission Medium (cables or non cable)
•Receiver (device used to receive data)
•Destination (where the data will be placed)
5 Basic Components
- simplex: One direction only
Transmission Direction
Half Duplex Transmission
half duplex: Both
directions but
only one
direction at a
time
Full Duplex Transmission
full duplex:
send and
receive both
directions at
once
RS232
Analog ADC Line coding
Digital
transmission
Sampling
Quantization
Coding
RZ,
NRZ,
AMI
ASK,
FSK,
PSK
Block diagram for digital transmission system
Before any digital signal can be transmitted (via
transmission medium or wireless) it must
undergo line coding. What is line coding??
PCM
9
We are
here..
Line Coding
Pulse-code modulation (PCM) is a digital representation of an analog signal where the magnitude
of the signal is sampled regularly at uniform intervals, then quantized to a series of symbols in a
numeric (usually binary) code.
Analog Data, Digital Signals
PCM Procedures
10 September 2012
10
Pulse-amplitude modulation, acronym PAM, is a form of signal modulation where the message
information is encoded in the amplitude of a series of signal pulses.
Sampled signal (discrete
signal): discrete time,
continuous values.
Quantized signal: continuous
time, discrete values
Digital signal (sampled,
quantized): discrete time,
discrete values.
Quantization is the procedure of constraining something from a relatively large or continuous
set of values (such as the real numbers) to a relatively small discrete set (such as the integers).
Mạch lấy mẫu và giữ
- Để lấy mẫu, công tắc được đóng lại trong một khoảng thời gian đủ để tụ nạp đến giá
trị V
in
. Khi công tắc được nhả ra, giá trị điện thế được giữ nguyên.
- Thời gian công tắc đóng lại (t) được xác định như sau (trong khoảng thời gian này, tụ
có thể nạp đến 99% giá trị V
in
)
Định lý lấy mẫu (tiêu chuẩn Nyquist)
Tất cả thông tin của tín hiệu gốc có thể được phục hồi nếu nó được lấy mẫu với tần số
(f
s
) lớn gấp ít nhất 2 lần tần số cao nhất (f
h
) trong tín hiệu gốc.
Thời gian lấy mẫu:
information
PCM
Line
coder
channel
Reasons for line
coding:
1. Synchronization
2. Error detection
3. Error correction
The purpose of a line code is to
match the output signal
to the channel for baseband
transmission.
• drawbacks are that it is not self-clocking
(Receiver Setting the clock matching the sender’s )
Line CodingLine Coding
Unipolar encoding (NRZ)
RZ encoding
Digital Data ⇒ Analog Signals
•Encoding is by modulation of a continuous
sinusoidal carrier signal. This involves
alteration of some characteristics of the
carrier signal - amplitude, frequency, or phase.
•Various encoding techniques, ASK, FSK, PSK,...
ASK