Chapter 5' Local Asynchronous Communication RS232 - PowerPoint PPT Presentation

1 / 26
About This Presentation
Title:

Chapter 5' Local Asynchronous Communication RS232

Description:

How to use electric current to transfer digital information ... Baud Rate, Framing, And Errors. Baud rate ... RS-232 baud rate equal to bit rate. Framing errors ... – PowerPoint PPT presentation

Number of Views:241
Avg rating:3.0/5.0
Slides: 27
Provided by: jing2
Category:

less

Transcript and Presenter's Notes

Title: Chapter 5' Local Asynchronous Communication RS232


1
Chapter 5. Local Asynchronous Communication
(RS-232)
  • Jing Wang
  • Towson University

2
5.1. Introduction
  • How to use electric current to transfer digital
    information across short distances
  • How bits can be encoded
  • Binary digits (bits)
  • mechanism to send characters between keyboard and
    computer
  • Quantitative measures
  • Bandwidth and delay

3
5.2. The Need For Asynchronous Communication
(RS-232)
  • Asynchronous
  • The sender and receiver do not synchronize before
    each transmission
  • A sender transmits at any time
  • A receiver accepts and interprets the signal
  • Useful for devices such as keyboards

4
5.3. Using Electric Current To Send Bits
  • Figure 5.1. Illustration of how positive and
    negative voltage can be used to transmit bits
    across a wire. In this example, the sender
    applies a negative voltage to send a 1 bit or a
    positive voltage to send a 0 bit.

5
5.3. Using Electric Current To Send Bits
  • Waveform diagram
  • A visual representation of how an electrical
    signal varies over time

6
5.4. Standards For Communication
  • Organizations
  • ITU (International Telecommunication Union)
  • EIA (Electronic Industries Association (EIA)
  • IEEE (Institute for Electrical and Electronic
    Engineers)

7
5.4. Standards For Communication (cont.)
  • RS-232
  • A standard produced by EIA
  • Transfer characters across copper wires between a
    computer and a device such as a modem, keyboard,
    or terminal
  • Specifies details of physical connection
  • Connection less than 50 feet long
  • The two voltages range from -15 volts to 15 volts

8
5.4. Standards For Communication (cont.)
  • RS-232
  • Defines serial, asynchronous communication
  • Serial (bits travel one after another)
  • Never leaves zero volts on the wire
  • When the transmitter has nothing to send, it
    leaves the wire with a negative voltage
    (corresponds to bit value 1)
  • Start bit - 0
  • Stop bit 1
  • Transmission of 7 bits character requires 9 bits

9
5.4. Standards For Communication (cont.)
  • Figure 5.2. The voltage on a wire as a character
    is transmitted using RS-232. A start bit notifies
    the receiver that a character is starting, and
    each bit transmission lasts the same length of
    time.

10
5.4. Standards For Communication (cont.)
  • RS-232 is a popular standard used for
    asynchronous, serial communication over short
    distances between a computer and a modem or ASCII
    terminal.
  • RS-232 precedes each character with a start bit,
    follows each character with an idle period at
    least one bit long (stop bit), and sends each bit
    in exactly the same length of time.

11
5.4. Standards For Communication (cont.)
  • Types of local communication
  • Determining factors Cost and Ease of Use
  • IEEE 1394 high speed serial bus (Fire Wire)
  • Speed up to 400Mbps
  • Self-configured addressing
  • A tiered-star topology allow up to 63 devices

12
5.4. Standards For Communication (cont.)
  • USB (Universal Serial Bus)
  • Easy to use for end users
  • Wide range of workload and applications
  • Bandwidths ranging from a few kbps to hundreds
    Mbps
  • Low-speed 10 100 Kbps (keyboard, mouse)
  • Full-speed 500 Kbps 10 Mbps (phone, audio)
  • High-speed 25 400 Mbps (video, storage)
  • Support up to 127 physical devices
  • Flexibility different packet size, data rate,
    flow control
  • Robustness hot swap, error handling
  • SCSI (Small Computer Systems Interface)

13
5.4. Standards For Communication (cont.)
  • RS-232
  • RS-422/485
  • Balanced systems
  • Balanced transmission each of the main circuits
    requires two wires, with no common ground
  • Unbalanced transmission all circuits share a
    common ground
  • Speed over 10 Mbps
  • Connect up to 32 devices
  • Distance up to 1200m

14
Figure 6-15
RS-423 Unbalanced Mode
NRZ-L nonreturn to zero-level
? The McGraw-Hill Companies, Inc., 1998
WCB/McGraw-Hill
15
Figure 6-16
RS-422 Balanced Mode
NRZ-L nonreturn to zero-level
? The McGraw-Hill Companies, Inc., 1998
WCB/McGraw-Hill
16
5.5. Baud Rate, Framing, And Errors
  • Baud rate
  • The number of changes in the signal per second
    that the hardware generates
  • RS-232 baud rate equal to bit rate
  • Framing errors
  • A receiver measures the voltage for each bit
    multiple times and compares the measurements.
  • If the voltages do not all agree or if the stop
    bit does not occur exactly at the time expected,
    the receiver reports an error.

17
5.6. Full Duplex Asynchronous Communication
  • Figure 5.3. The minimal wiring required for
    full-duplex RS-232 communication in which control
    wires are omitted. Although the two circuits
    carry data independently, it is possible for them
    to share a single ground wire.

18
5.6. Full Duplex Asynchronous Communication
  • Electric circuits requires two wires
  • Signal (current flows out)
  • Ground (return path)
  • Transmission type
  • Full duplex
  • Half duplex or simplex

19
5.7. Limitations of Real Hardware
  • Figure 5.4. An illustration of the voltage
    emitted by a real device as it transmits a bit.
    In practice, voltages are often worse than this
    example.

20
5.7. Limitations of Real Hardware
  • Impairment
  • Attenuation
  • loss of energy
  • Distortion
  • Signal changes its form or shape
  • Occurs in a composite signal
  • Noise
  • Thermal noise random motion of electrons in a
    wire
  • Induced noise from motors and appliances
  • Crosstalk the effect of one wire on the other
  • Impulse noise a signal with high energy in a
    very short time

21
5.8. Hardware Bandwidth And The Transmission of
Bits
  • Bandwidth
  • The maximum rate that hardware can change a
    signal
  • Measured in cycles per second or Hertz (Hz)
  • Nyquist Intersymbol Interference Theorem
  • If the transmission system of bandwidth B uses K
    possible values of voltage, the maximum data rate
    in bits per second D is
  • D 2Blog2K
  • RS-232, K 2, so D 2B

22
5.9. The Effect of Noise On Communication
  • Shannons Theorem
  • C Blog2(1 S/N)
  • C is effective limit on the channel capacity in
    bits per second
  • B is the hardware bandwidth
  • S is the average signal power
  • N is the average noise power
  • Noise is background interference
  • S/N is signal-to-noise ratio
  • 10log10S/N is decibels (dB)

23
5.10. Significance For Data Networking
  • Nyquists theorem encourages engineers to explore
    ways to encode bits on a signal because a clever
    encoding allows more bits to be transmitted per
    unit time.
  • Shannons Theorem informs engineers that no
    amount of clever encoding can overcome that laws
    of physics that place a fundamental limit on the
    number of bits per second that can be transmitted
    in a real communication system

24
5.10. Significance For Data Networking
  • Voice telephone system has a signal-to-noise
    ratio of approximately 30 dB and a bandwidth of
    approximately 3000 Hz
  • 10log10S/N 30 dB
  • S/N 1000
  • According to Shannons Theorem, the maximum
    number of bits per second that can be transmitted
    is limited to
  • C 3000log2(1 1000)
  • Approximately 30,000 bps

25
5.11. Summary
  • RS-232 standard
  • Asynchronous transmission of characters over
    short distances
  • Between a keyboard and a computer
  • Over a computers serial ports
  • Idle negative voltage
  • Start bit informs a character is arriving
  • Stop bit detects all bits of the character
    arrived in the time allotted.

26
5.11. Summary
  • Bandwidth
  • Hardware bandwidth the speed at which hardware
    can change state
  • Nyquists theorem defines relationship between
    hardware bandwidth and the theoretical maximum
    rate at which data can be sent
  • Shannons theorem gives a limit on the rate at
    which data can be sent in the presence of noise

http//www.nullmodem.com/DB-9.htm
Write a Comment
User Comments (0)
About PowerShow.com