RS232 and RS485 Fundamental.

Slides:



Advertisements
Similar presentations
Serial Interface Dr. Esam Al_Qaralleh CE Department
Advertisements

Communication lines. OSI model Open Systems Interconnection (OSI) model (ISO/IEC ) Source: homepages.uel.ac.ukhomepages.uel.ac.uk Physical layer.
Arctic IEC-104 Gateway Jari Lahti, CTO.
DATA COMMUNICATIONS Some organisations concerned with standards: EIA - Electroonic Industries Association (RS standards including RS-232) IEEE - Institute.
1 Fall 2005 Local Serial Asynchronous Communication Qutaibah Malluhi Computer Science and Engineering Qatar University.
Local Asynchronous Communication and RS-232. Goals Explain how electric current can be used to transmit bits over short distances Present a popular mechanism.
PH4705 ET4305 Interface Standards A number of standard digital data interfaces are used in measurement systems to connect instruments and computers for.
EUT 1040 Lecture 10: Programmable Logic Controllers.
RS-232 Communications. Why Serial Communications? Serial communication is the most simplistic form of communication between two devices. It’s pretty intuitive.
1 Outline Standards Organisations Interface Standards  The RS-232-C Standard  RS-449, RS-422-A, RS-423-A  USB and FireWire.
Eng. Husam Alzaq The Islamic Uni. Of Gaza
CSCI 4550/8556 Computer Networks Comer, Chapter 5: Local Asynchronous Communication (RS-232)
COMP3221: Microprocessors and Embedded Systems
7-1 Digital Serial Input/Output Two basic approaches  Synchronous shared common clock signal all devices synchronised with the shared clock signal data.
EET Advanced Digital Chapter 21 Serial Ports.
EUT 1040 PLC Timers and Motor Protection. Industrial Communications RS-422 (EIA 422): Asynchronous Serial Communications, similar in many respects to.
1 The 9-Pin Connector Pin abbreviations (numbers in parentheses are the 25D pin numbers): 1. CD (8) 2. RD (Rx) (3) 3. TD (Tx) (2) 4. DTR (20) 5. SG (Ground)
Chapter 6 Serial Communications Objectives Introduce the RS232 standard and position it within the crowded field of serial communications standards. Configure.
Serial Communications Standards (Partly Excerpted from Simpl Primer) Cabling Configuration Protocol.
ECE 371- Unit 11 Introduction to Serial I/O. TWO MAJOR CLASSES OF SERIAL DATA INTERFACES ASYNCHRONOUS SERIAL I/O - USES “FRAMING BITS” (START BIT AND.
Local Asynchronous Communication
12 - Winter 2006 ECE ECE 766 Computer Interfacing and Protocols 1 Interfaces Transmission of data from the source to a device or from a device to the destination.
Local Asynchronous Communications. Bit-wise data transmission Data transmission requires: Encoding bits as energy Transmitting energy through medium Decoding.
RS422, RS485, RS423, RS449 and V.35 Data Communications (E&T2760): RS422, RS485, RS423, RS449 and V.35.
University of Tehran 1 Interface Design Serial Communications Omid Fatemi.
Technology Training that Works Hands of Data Communications, Networking & TCP/IP Troubleshooting.
USART Communication using the RS standard ETEC6416.
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.
Arctic RS-485 / RS-422. RS- 485 Also known as RS-485 Half Duplex, RS wire same pair is used to transmit and receive data only one device can transmit.
Serial Port I/O Serial port sends and receives data one bit at a time. Serial communication devices are divided into: Data Communications Equipment (DCE),
1 Ch 5 Local Asynchronous Communication (RS-232).
Universal Synchronous/Asynchronous Receiver/Transmitter (USART)
Lecture 20: Communications Lecturers: Professor John Devlin Mr Robert Ross.
1 Microprocessor-based Systems Course 9 Design of the input/output interfaces (continue)
Line Coding, Modem, RS232 interfacing sequences.
“Describe the overview of hardware interfacing and the serial communication interface. Describe the PIC18 connections to RS232. Explain the serial port.
Universal Asynchronous Receiver/Transmitter (UART)
Microprocessors 2 lesson Subjects lesson 7 Planning Interrupts Serial communication /USART Questions.
CHAPTER SERIAL PORT PROGRAMMING. Basics of Serial Communication Computers transfer data in two ways: ◦ Parallel  Often 8 or more lines (wire conductors)
Serial Communications
Advanced Embedded Systems Design Lecture 8 Serial I/O BAE Fall 2004 Instructor: Marvin Stone Biosystems and Agricultural Engineering Oklahoma.
Chapter 5: Local Asynchronous Communication 1. Bit-wise data transmission 2. Asynchronous communication 3. Sending bits with electric current 4. Standard.
 8251A is a USART (Universal Synchronous Asynchronous Receiver Transmitter) for serial data communication.  Programmable peripheral designed for synchronous.
Universal Asynchronous Receiver/Transmitter (UART)
Interfaces and Synchronization Martin Weiss. EIA 232D Interface Standard u Synonymous with ITU V.24 u Asynchronous interface u Up to 19.2kbps u 50 foot.
Digital Interfaces An interface links two devices Interface Standards define: – mechanical specifications - how many wires & connector type –electrical.
CSC 335 Data Communications and Networking Lecture 4b: Communication and Multiplexing Dr. Cheer-Sun Yang.
©F.M. Rietti Communication Lines Fundamentals. ©F.M. Rietti LM-18 Computer Science SSI Embedded Systems I 2 Communication Lines Generally used to connect.
BASICS OF SERIAL COMMUNICATIONS BIRLA VISHWKARMA MAHAVIDYALAYA ELECTRONICS & TELECOMMUNICATION DEPARTMENT PRESENTING BY: ABHISHEK SINGH AMANDEEP.
Serial/Fiber-Converter - IE-MCT-1RS232/485-1SC/ST
NARNARAYAN SHASTRI INSTITUTE OF TECHNOLOGY Prepared by: Wasu Ichcha kaur H Bhalani Nidhi M Dhakate Megha D MICROCONTROLLER.
Lecture 10: Programmable Logic Controllers
Serial mode of data transfer
RS-232 Communications.
Homework Reading Continue mp1 Labs Tokheim, Section 13-6 Questions?
Serial Communications
RS-232 Communications.
Serial Communication: RS-232 (IEEE Standard)
Local Asynchronous Communication (RS-232)
Asynchronous Serial Communications
Serial Communication Interface
PLC’s Are ... Similar to a Microcontroller: Microprocessor Based
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
ANALOG AND DIGITAL PHYSICAL INTERFACES
PIC Serial Port Interfacing
8051SERIAL PORT PROGRAMMING
PIC Serial Port Interfacing
EUT 1040 Lecture 10: Programmable Logic Controllers Unrestricted.
Presentation transcript:

RS232 and RS485 Fundamental

Agenda When: Day DD/MM/YYYY Where: Place Who: Speaker / Professional qualification What: RS232 and RS485 Fundamental Duration: HH:MM hours Level: Basic

Module’s Contents What is RS232 RS-232 Signals RS-232 Line Driver RS-232 Speed RS-232 SW settings What is RS-485 RS-485 Line Driver RS-485 Network RS-485 Half-duplex RS-485 Full-duplex RS-485 and DL devices RS-232 vs RS-458

What is RS-232 RS-232 is a popular communications interface for connecting modems and data acquisition devices (i.e. GPS receivers, electronic balances, data loggers, ...) to computers. RS-232 can be plugged straight into the computer’s serial port (know as COM or Comm port).

RS-232 Signals Architecturally RS-232 is a bi-directional point to point link. (serial port - PC side) Two independent channels are established for two-way (full-duplex) communications. RS-232 can also carry additional signals used for flow control (RTS, CTS) and modem control (DCD, DTR, DSR, RI).

RS-232 Signals Common 25 pin D-shell connector pinout used for asynchronous data communications. Pin Signal 1 PGND Protective Ground 2 TXD Transmit Data 3 RXD Receive Data 4 RTS Ready To Send 5 CTS Clear To Send 6 DSR Data Set Ready 7 SG Signal Ground 8 CD Carrier Detect 20 DTR Data Terminal Ready 22 RI Ring Indicator (serial port - PC side)

RS-232 Line Driver Unbalanced Line Drivers Each signal appears on the interface connector as a voltage with reference to a signal ground. The “idle” state (MARK) has the signal level negative with respect to common whereas the active state (SPACE) has the signal level positive respest to the same reference.

RS-232 Speed How fast can RS-232 be? The maximum speed, according to the standard, is 20kbit/s. However, modern equipment can operate much faster than this. (i.e. Lynx can reach 115200 baud.) The length of the cable also plays a part in maximum speed. The longer the cable and the slower the speed at which you can obtain accurate results. A large wire capacitance and inductance limits the maximum length of the cable and/or the maximum speed; Moreover higher is the capacitance of the cable higer is the interference between two adjacent signal wire. 50 feet (15m) @ max baudrate is commonly quoted as the maximum distance. It is not specified in EIA standard but it’s recommended respect these values.

RS-232 sw settings One byte of async data has: Start Bit = 1 (always) Data Bits = 8 (or 7) Stop bits = 1 (or 2) Parity = NONE (or EVEN or ODD) + 25 - 25

What is RS-485 What is RS-485? RS-485 is a EIA standard interface which is very common in the data acquisition world RS-485 provides balanced transmission line which also can be shared in Multidrop mode. It allows high data rates communications over long distances in real world environments. How fast can RS-485 be? RS-485 was designed for greater distance and higher baudrates than RS-232. According to the standard, 100kbit/s is the maximum speed and distance up to 4000 feet (1200 meters) can be achieved.

RS-485 Line Driver Balanced Line Drivers Voltage produced by the driver appears across a pair of signal wires that transmit only one signal. Both wires are driven opposite. RS-485 driver has always the “Enable” direction control signal. Differential system provides noise immunity, because much of the common mode signal can be rejected by the receiver. So ground shifts and induced noise signals can be nullified.

RS-485 Network RS-485 provides Half-Duplex, Multidrop communications over a single twisted pair cable. MASTER SLAVE-1 SLAVE-2 SLAVE-3 The standard specifies up to 32 drivers and 32 receivers can share a multidrop network Terminator resistors avoid reflected signal

RS-485 Half-duplex Datalogic uses Half-Duplex configurations for Data Collecting and Master/Slave layouts. Usually we talk about Multidrop network (i.e. MX4000,DPS9000) Slave 1 TX ENABLE RX RTX485+ RTX485- 485GND Master TX ENABLE RX Slave 2 TX ENABLE RX Slave N TX ENABLE RX

RS-485 Full-duplex TX485+ TX485- RX485+ RX485- 485GND Potentially RS-485 interface can also use 4-wires to comunicate in multidrop mode but... Scanner TX ENABLE RX TX485+ TX485- RX485+ RX485- 485GND Other device

RS-232 vs RS-485 The architectural difference between RS-232 and RS-485 is that 232 is a bi-directional point to point link, whereas 485 is a single channel bus. Electrically, each 232 signal uses a single wire with symmetric voltages about a common ground wire. 485 uses two wires to carry the single signal differentially. The big difference to the software is that only one device on a 485 bus can transmit at a time, whilst there is not similar limitation on RS232 because is a peer-to-peer link .

RS-232 vs RS-485 Mode of Operation SINGLE-ENDED DIFFERENTIAL RS-232 RS-485 Mode of Operation SINGLE-ENDED DIFFERENTIAL Total Number of Drivers 1 DRIVER 32 DRIVER and Receivers on One Line 1 RECEIVER 32 RECEIVER Maximum Cable Length 50 FEET 4000 FEET Maximum Data Rate @Max length 20kb/s 100kb/s Driver Output Signal Level (Loaded Min.) Loaded +/-5V to +/-15V +/-1.5V Driver Output Signal Level (Unloaded Max) Unloaded +/-25V +/-6V Driver Load Impedance 3k to 7k 54 Max. Driver Current in High Z State Power On N/A N/A Max. Driver Current in High Z State Power Off +/-6mA @ +/-2v +/-100uA Slew Rate (Max.) 30V/S N/A Receiver Input Voltage Range +/-15V -7V to +12V Receiver Input Sensitivity +/-3V +/-200mV Receiver Input Resistance 3k to 7k  12k

Data Format and Protocols Information content passing through peer-to-peer connection is packed in a very simple structure: <Header-string> <Code identifier ><INFO-FIELD><Terminator-string> <Header-string> and <Terminator-string> are both configurable via software (device configuration parameters) Most common generic Handshake are available/selectable with RS232 interface: Hardware (RTS-CTS) Software XON/XOFF