Local Asynchronous Communication (RS-232)

Slides:



Advertisements
Similar presentations
Data Communication Topics to be discussed:  Data Communication Terminology.  Data Transmission Signals.  Data Transmission Circuits.  Serial & Parallel.
Advertisements

1 Fall 2005 Local Serial Asynchronous Communication Qutaibah Malluhi Computer Science and Engineering Qatar University.
Chapter 4 Making Connections. 2 Introduction  Examine the interface between a computer and a device. This interface occurs at the physical layer.  Connecting.
Local Asynchronous Communication and RS-232. Goals Explain how electric current can be used to transmit bits over short distances Present a popular mechanism.
Chapter 3 - Transmission Media Basic Idea Transmission media Copper wires Glass fibers Radio Microwave Infrared Laser Choosing a medium Media in use at.
RS-232 Communications. Why Serial Communications? Serial communication is the most simplistic form of communication between two devices. It’s pretty intuitive.
1 Chapter Four Making Connections. 2 Introduction Connecting peripheral devices to a computer has, in the past, been a fairly challenging task Newer interfaces.
CS335 Networking & Network Administration Tuesday, April 6.
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.1 Computer Networks and Internets with Internet Applications, 4e By Douglas.
CSCI 4550/8556 Computer Networks Comer, Chapter 5: Local Asynchronous Communication (RS-232)
7-1 Digital Serial Input/Output Two basic approaches  Synchronous shared common clock signal all devices synchronised with the shared clock signal data.
1 Fall 2005 Long Distance Communication Carriers, Modulation, And Modems Qutaibah Malluhi Computer Science and Engineering Qatar University.
Data Communications Chapter 6 The Data Communications Interface.
Alogrithm Analysis 實踐資管 Wang-Jiunn Cheng 2004 Computer Networks (CS422) Douglas Comer Computer Science Department Purdue University West Lafayette, IN.
Serial Communications Standards (Partly Excerpted from Simpl Primer) Cabling Configuration Protocol.
Local Asynchronous Communication
Local Asynchronous Communications. Bit-wise data transmission Data transmission requires: Encoding bits as energy Transmitting energy through medium Decoding.
1 SCI Serial Communication Interface Gerrit Becker James McClearen Charlie Hagadorn October 21, 2004.
University of Tehran 1 Interface Design Serial Communications Omid Fatemi.
Technology Training that Works Hands of Data Communications, Networking & TCP/IP Troubleshooting.
Transmission Modes Serial Transmission  One bit is transmitted on a circuit at a time  Usually there is one transmit circuit and one receive circuit.
Computers in Surveying SVY2301 / E4006 Automated Surveying.
1 Chapter 4-6 Signals, Media, And Data Transmission.
1 Long-Distance Communication. 2 Illustration of a Carrier Carrier –Usually a sine wave –Oscillates continuously –Frequency of carrier fixed.
1 Ch 5 Local Asynchronous Communication (RS-232).
Data Communications Introduction and Review. Transmission Media Copper Wires Copper Wires Low resistance. Electrical signal produces miniature radio station.
Data Transmission The basics of media, signals, bits, carries, and modems (Part III)
Universal Asynchronous Receiver/Transmitter (UART)
Scott Baker Will Cross Belinda Frieri March 9 th, 2005 Serial Communication Overview ME4447/6405.
Chapter 5: Local Asynchronous Communication 1. Bit-wise data transmission 2. Asynchronous communication 3. Sending bits with electric current 4. Standard.
Day 7 Connections. Standards Unless we had connection standards nothing would be interchangeable. –There would be different printers for Macs and Windows.
1 Transmission of Digital Data : Interface and Modems.
Digital Interfaces An interface links two devices Interface Standards define: – mechanical specifications - how many wires & connector type –electrical.
FUNDAMENTALS OF NETWORKING
CSC 335 Data Communications and Networking Lecture 4b: Communication and Multiplexing Dr. Cheer-Sun Yang.
CSI 4118Fall Part 1.1 Signals, Media, And Data Transmission.
1 Business Telecommunications Data and Computer Communications Chapter 6 The Data Communications Interface.
CE-2810 Dr. Mark L. Hornick 1 Serial Communications Sending and receiving data between devices.
COMPUTER NETWORKS Lecture-3 Husnain Sherazi. Review Lecture 2  Resource Sharing  Growth of the Internet – Linear Scale – Log Scale  Tools for Probing.
NARNARAYAN SHASTRI INSTITUTE OF TECHNOLOGY Prepared by: Wasu Ichcha kaur H Bhalani Nidhi M Dhakate Megha D MICROCONTROLLER.
COMPUTER NETWORKS CS610 Lecture-3 Hammad Khalid Khan.
Serial Communications
William Stallings Data and Computer Communications
RS-232 Communications.
6.1 Communication Methods
Transmission Modes The term transmission mode to refer to the manner in which data is sent over the underlying medium Transmission modes can be divided.
SERIAL PORT PROGRAMMING
Serial Communications
RS-232 Communications.
DATA COMMUNICATION Lecture-21.
Pemrosesan Data Tersebar
Serial Communication: RS-232 (IEEE Standard)
William Stallings Data and Computer Communications 7th Edition
Long-Distance Communication (Carriers, Modulation, And Modems)
DIGITAL DATA COMMUNICATION TECHNIQUES
Lecture 4 Continuation of transmission basics Chapter 3, pages 75-96
Asynchronous Serial Communications
Serial Communication Interface: Using 8251
Serial Communication Interface
Signals, Media, And Data Transmission
Signals, Media, And Data Transmission
CHAPTER SERIAL PORT PROGRAMMING. Basics of Serial Communication Computers transfer data in two ways: ◦ Parallel  Often 8 or more lines (wire.
Chapter 6 Transmission of Digital Data Interfaces and Modems
Chapter 9 Transmission Modes
ANALOG AND DIGITAL PHYSICAL INTERFACES
PIC Serial Port Interfacing
PIC Serial Port Interfacing
Serial Communications
William Stallings Data and Computer Communications
Chapter 6: INTERFACES Visit for more Learning Resources.
Presentation transcript:

Local Asynchronous Communication (RS-232) 1 Bit-wise data transmission 2 Asynchronous communication 3 Using electric current to send bits 4 Sending bits - example 5 Transmission timing 6 RS-232 7 Details of RS-232 8 RS-232 wiring and connectors 9 Identifying asynchronous characters 10 Timing

11 Measures of transmission rates 12 Framing 13 Full-duplex communication 14 RS-232 connection standards 15 2-3 swap 16 RS-232 cable breakout-box 17 Limitations of real hardware 18 Hardware bandwidth 19 Bandwidth and data transmission 20 Newer standards 21 Summary

Bit-wise data transmission Data transmission requires: Encoding bits as energy Transmitting energy through medium Decoding energy back into bits Energy can be electric current, radio, infrared, light Transmitter and receiver must agree on encoding scheme and transmission timing

Asynchronous communication* One definition of asynchronous: transmitter and receiver do not explicitly coordinate each data transmission Transmitter can wait arbitrarily long between transmissions Used, for example, when transmitter such as a keyboard may not always have data ready to send Asynchronous may also mean no explicit information about where data bits begin and end

Using electric current to send bits Simple idea - use varying voltages to represent 1s and 0s One common encoding use negative voltage for 1 and positive voltage for 0 In following figure, transmitter puts positive voltage on line for 0 and negative voltage on line for 1 Sending bits - example

Transmission timing Encoding scheme leaves several questions unanswered: How long will voltage last for each bit? How soon will next bit start? How will the transmitter and receiver agree on timing? Standards specify operation of communication systems Devices from different vendors that adhere to the standard can interoperate Example organizations: International Telecommunications Union (ITU) Electronic Industries Association (EIA) Institute for Electrical and Electronics Engineers (IEEE)

RS-232 Standard for transfer of characters across copper wire Produced by EIA Full name is RS-232-C RS-232 defines serial, asynchronous communication Serial - bits are encoded and transmitted one at a time (as opposed to parallel transmission) Asynchronous - characters can be sent at any time and bits are not individually synchronized

Details of RS-232 Components of standard: Connection must be less than 50 feet Data represented by voltages between +15v and -15v 25-pin connector, with specific signals such as data, ground and control assigned to designated pins Specifies transmission of characters between, e.g., a terminal and a modem Transmitter never leaves wire at 0v; when idle, transmitter puts negative voltage (a 1) on the wire

RS-232 wiring and connectors

Identifying asynchronous characters Transmitter indicates start of next character by transmitting a zero Receiver can detect transition as start of character Extra zero called the start bit Transmitter must leave wire idle so receiver can detect transition marking beginning of next character Transmitter sends a one after each character Extra one call the stop bit Thus, character represented by 7 data bits requires transmission of 9 bits across the wire

Example RS-232 terminology: MARK is a negative voltage (== 1) SPACE is a positive voltage (== 0)

Timing Transmitter and receiver must agree on timing of each bit Agreement accomplished by choosing transmission rate Measured in bits per second Detection of start bit indicates to receiver when subsequent bits will arrive Hardware can usually be configured to select matching bit rates Switch settings Software Autodetection

Measures of transmission rates Baud rate measures number of signal changes per second Bits per second measures number of bits transmitted per second In RS-232, each signal change represents one bit, so baud rate and bits per second are equal If each signal change represents more than one bit, bits per second may be greater than baud rate

Framing Start and stop bits represent framing of each character If transmitter and receiver are using different speeds, stop bit will not be received at the expected time Problem is called a framing error RS-232 devices may send an intentional framing error called a BREAK

Full-duplex communication Two endpoints may send data simultaneously - full-duplex communication Requires an electrical path in each direction

RS-232 connection standards RS-232 specifies use of 25 pin connector (DB-25) Pins are assigned for use as data, ground and control: Pin 2 - Receive (RxD) Pin 3 - Transmit (TxD) Pin 4 - Ready to send (RTS) Pin 5 - Clear to send (CTS) Pin 7 - Ground

2-3 swap Cable must cross-over wires to connect pins 2 and 3 on receiver and transmitter To avoid 2-3 swap, RS-232 specifies that modems transmit on pin 2 and receive on pin 3, while computers transmit on pin 3 and receive on pin 2 However, RS-232 cables between two computers must have 2-3 swap

RS-232 cable breakout-box May need to test RS-232 connections Breakout-box gives access to signals

Limitations of real hardware Effects of wire mean waveforms look like: Longer wire, external interference may make signal look even worse RS-232 standard specifies how precise a waveform the transmitter must generate, and how tolerant the receiver must be of imprecise waveform

Hardware bandwidth Limitations on time to change voltages imposes upper limit on number of changes per second Theoretical upper limit is called the bandwidth Measured in cycles per second or Hertz

Bandwidth and data transmission Nyquist sampling theorem expresses relationship between bandwidth and maximum data transmission speed For RS-232, using two voltages, maximum speed over medium with bandwidth B is 2B In general, for system using K different physical states, maximum is 2Blog2K In practice, noise limits maximum data transmission rate to less than maximum allowed by Nyquist sampling theorem; Claude Shannon C = Blog2(1+S/N)

Newer standards USB (Universal Serial Bus) www.lvr.com/usb.htm A good introduction article www.embedded.com/internet/0003/0003ia2.htm Firewire as a high speed serial bus www.dvcentral.org/Firewire.html

Summary Asynchronous communication - data can start at any time; individual bits not delineated RS-232 - EIA standard for asynchronous character transmission Characters per second and baud rate Bandwidth limits maximum data transmission rate Newer standards such as USB and Firewire have replaced the role of RS 232 in PC