Documente Academic
Documente Profesional
Documente Cultură
Yu-Yu Lin
Electrical Engineering Department University of California (UCLA), USA,
yuyu@seas.ucla.edu
EE 132B
Fall 2015
1 / 17
Outline
Introduction to RS-232
EE 132B
Fall 2015
2 / 17
Introduction to RS-232
RS-232
RS-232 (Recommended Standard 232) is a standard for serial
binary data signals connecting between a DTE (Data terminal
equipment) and a DCE (Data Circuit-terminating Equipment).
A standard is a set of conventions that is designed to resolve
equipment incompatibilities, as well as to coordinate data
transmission between senders and receivers.
EE 132B
Fall 2015
3 / 17
Introduction to RS-232
RS-232 Contd
RS-232 dictates 4 types of specifications (Spec.)
Mechanical: 25 pin connector, physical dimension of plug and
connectors, assignments of circuits to pins.
Electrical: "ON" (1) if voltage < 3V; "OFF" (0) if voltage > 3V.
Functional: assign meaning to pins, like define which pins are used
for data, control, timing, ground,...
Procedural: dictate sequences of events (control and data
activations) to activate, use, and deactivate the connection.
EE 132B
Fall 2015
4 / 17
Introduction to RS-232
RS-232C
Serial, Asynchronous Communication, bit-oriented, characters
transmitted one at a time.
When the line is idle, a negative voltage exists on the cable
Start bit: transmitter sends a "0" positive voltage
Stop bit: transmitter sends a "1" negative voltage after each
character
T
Idle
7 data bits
Start
bit
Idle
Stop
bit
EE 132B
Fall 2015
5 / 17
Introduction to RS-232
RS-232C - Contd
EE 132B
Fall 2015
6 / 17
Introduction to RS-232
Computer
(DTE)
Modem
(DCE)
EE 132B
Fall 2015
7 / 17
Introduction to RS-232
EE 132B
Fall 2015
8 / 17
Introduction to RS-232
Limitations of RS-232C
EE 132B
Fall 2015
9 / 17
Introduction to RS-232
State Diagram
Example
Show the state transition diagram for a half duplex call: Station 1
initiates a call to station 2. Then the user at station 2 hears the
phone, picks up and say "hello".
EE 132B
Fall 2015
10 / 17
Introduction to RS-232
Computer 1
Modem 1
Modem 2
Station 1
All line are idle
Computer 2
Station 2
(7,7)
DTR
(7,7)
(5,7)
DSR
DTR
(6,7)
(1,7)
(4,7)
DSR, R
(1,7)
Connection Setup
EE 132B
Fall 2015
11 / 17
Introduction to RS-232
Computer 1
Modem 1
Modem 2
Station 1
Computer 2
Station 2
Connection Setup
(1, 7)
RLSD
(1, 6)
RTS
(1, 2)
CTS
(1, 0)
(1, 7)
RLSD
(1, 6)
RTS
CTS
EE 132B
Fall 2015
12 / 17
Introduction to RS-232
EE 132B
Fall 2015
13 / 17
Introduction to RS-232
Others
Timing diagram
Please refer to class notes
EE 132B
Fall 2015
14 / 17
EE 132B
Fall 2015
15 / 17
Problem 4 Contd
Data message
ACK
Data message
tp
Data message
t
CTS
delay in
TX
tp
ACK
CTS
delay in
RX
Data message
tp
EE 132B
Fall 2015
16 / 17
Problem 4 Contd
Data rate = TL , where L is the number of bits sent and T is the time
duration required to sent the bits.
EE 132B
Fall 2015
17 / 17