Eliminate Risk of Contention and Data Corruption in RS-485 Communications



Similar documents
Elettronica dei Sistemi Digitali Costantino Giaconia SERIAL I/O COMMON PROTOCOLS

The Secrets of RS-485 Half-duplex Communication

RS485 & RS422 Basics

RS-485 the Murphy Way!

Designing RS-485 Circuits

NMEA 0183 INSTALLATION AND OPERATING GUIDELINES

RS-422/485 Multiport Serial PCI Card. RS-422/485 Multiport Serial PCI Card Installation Guide

LINDY ELECTRONICS LIMITED & LINDY-ELEKTRONIK GMBH - SECOND EDITION

OPT SERIAL TO FIBER OPTIC CONVERTER

Connecting instruments serially to your computer

FOSTCDR. Industrial Serial to Multimode Fiber Optic Converter PRODUCT INFORMATION B&B ELECTRONICS. Specifications Serial Technology

1-Port R422/485 Serial PCIe Card

Application Note 83 Fundamentals of RS 232 Serial Communications

Remote Serial over IP Introduction on serial connections via IP/Ethernet

Industrial Multi-port Serial Cards

RS-422 and RS-485 Application Note

ESPA Nov 1984 PROPOSAL FOR SERIAL DATA INTERFACE FOR PAGING EQUIPMENT CONTENTS 1. INTRODUCTION 2. CHARACTER DESCRIPTION

Manual Serial PCI Cards

The Secrets of Flow Control in Serial Communication

USB to RS-422/485 Serial Adapter

Module 5. Broadcast Communication Networks. Version 2 CSE IIT, Kharagpur

Using Xbee in Serial Communication

Current Loop Application Note 1495

RS-485 Protocol Manual

The I2C Bus. NXP Semiconductors: UM10204 I2C-bus specification and user manual HAW - Arduino 1

2 Basic Concepts. Contents

White Paper. Technical Capabilities of the DF1 Half-Duplex Protocol

2-Port RS232/422/485 Combo Serial PCI Card

ALL-USB-RS422/485. User Manual. USB to Serial Converter RS422/485. ALLNET GmbH Computersysteme Alle Rechte vorbehalten

Introduction to WAN Technologies

Moxa TCC-100/100I User s Guide

Wiring RS-485 Networks

Welcome to the Introduction to Controller Area Network web seminar My name is William Stuart, and I am a Applications Engineer for the Automotive

Sending A/V Signals Over Twisted Pair Cables: An Introduction. What is A/V over twisted pair?... 2

Introduction to Ethernet

AVR151: Setup and Use of the SPI. Introduction. Features. Atmel AVR 8-bit Microcontroller APPLICATION NOTE

USB2.0 <=> I2C V4.4. Konverter Kabel und Box mit Galvanischetrennung

Interfacing Intel 8255x Fast Ethernet Controllers without Magnetics. Application Note (AP-438)

SyncLink GT2/GT4 Serial Adapter

Bidirectional wireless communication using EmbedRF

Connection to an RS-485 Network

VSCOM USB PRO Series Industrial I/O Adapters

CAN bus board. EB018

RS-232 Communications Using BobCAD-CAM. RS-232 Introduction

How to design and implement firmware for embedded systems

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING Question Bank Subject Name: EC Microprocessor & Microcontroller Year/Sem : II/IV

Understanding Device Level Connection Topologies

Quectel Cellular Engine

DS Wire Digital Thermometer and Thermostat

Process Control and Automation using Modbus Protocol

Advanced Data Capture and Control Systems

LED light control using DMX512 control method

Designing VM2 Application Boards

MODBUS RTU. Communications Guide. for use with MODCELL, MOD 30ML and Commander Products

s!nus-elektrotechnikai bt. Industrial IT & Automation

Fast Ethernet and Gigabit Ethernet. Networks: Fast Ethernet 1

COMPUTER HARDWARE. Input- Output and Communication Memory Systems

Balun Parameter Definitions & Measurement May 2004

Objectives. Lecture 4. How do computers communicate? How do computers communicate? Local asynchronous communication. How do computers communicate?

Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science Microprocessor Project Laboratory

Microcomputer Protocol Implementation at Local Interconnect Network Georgi Krastev

Implementing MOD bus and CAN bus Protocol Conversion Interface

Fiber Optic Connectivity SECURITY SURVEILLANCE SOLUTIONS. ComNet Managed Ethernet Switches

Fast Ethernet and Gigabit Ethernet. Computer Networks: Fast and Gigabit Ethernet

IT Data Communication and Networks (Optional)

DSX Master Communications

Instrumentação Suportada em Computadores Pessoais Instrumentation

CHAPTER 7: The CPU and Memory

Serial Communications

Tutorial.

KTA-223 Arduino Compatible Relay Controller

Objectives. Basics of Serial Communication. Simplex vs Duplex. CMPE328 Microprocessors (Spring ) Serial Interfacing. By Dr.

RC2200DK Demonstration Kit User Manual

User Manual IC-485AI

WHQL Certification Approval...2 User Interface...3 SUNIX s COMLab..4

In-System Programming Design TM. Guidelines for ispjtag Devices. Introduction. Device-specific Connections. isplsi 1000EA Family.

USB TO SERIAL ADAPTER

HSG Engineering Tech Bulletin

Troubleshooting and Auto-Negotiation Features for IMC Networks Media Conversion Products

Serial Communications

USART and Asynchronous Communication

CENTRONICS interface and Parallel Printer Port LPT

LDG DTS-4/4R Desktop Coaxial Switch / Remote

NTE2053 Integrated Circuit 8 Bit MPU Compatible A/D Converter

Omron I/O Driver (Series 2) Programmable Serial Interface Card

Computer buses and interfaces

DK40 Datasheet & Hardware manual Version 2

2. What is the maximum value of each octet in an IP address? A. 128 B. 255 C. 256 D. None of the above

NC-12 Modbus Application

EoVDSL: A Cost-Effective Solution for Transmitting Ethernet Data Over Existing Copper Wiring for ITS and Traffi c Applications

Cable Guide. Click on the subject to view the information. Digi Cables Building Cables General Cable Information

What You Will Learn About. Computers Are Your Future. Chapter 8. Networks: Communicating and Sharing Resources. Network Fundamentals

Modbus RTU Master Communications

Programming Flash Microcontrollers through the Controller Area Network (CAN) Interface

The Answer to the 14 Most Frequently Asked Modbus Questions

XPort Universal Demo Board User Guide

1. Make sure that no client accounts are open. 2. Click on Setup, then click Modem. The Modem Setup window will appear.

2S RS232 Multi Serial PCI Card Installation Guide

An Engineer s Guide to Full Compliance for CAT 6A Connecting Hardware

Software User Guide UG-461

Transcription:

I. Background and Objective Eliminate Risk of Contention and Data Corruption in RS-485 Communications Earle Foster, Jeff Hunter Sealevel Systems The RS-485 communications standard was introduced in 1983 by the Electronic Industries Alliance (EIA) as a two-wire, half-duplex, multi-drop alternative to the point-to-point RS-232 interface. (Note: RS-485 can also be wired using 4-wires to enable full-duplex communication). RS-485 uses differential signaling to allow up to 32 devices to communicate peer-to-peer at distances up to 4000 feet. In most RS-485 configurations two signals, a positive and a negative, are run as a twisted pair. Since these signals are compared to one another rather than a ground reference like RS-232, RS-485 communication is less susceptible to external noise injected on the wiring and performs more reliably in industrial environments. The following figure shows a typical RS-485 circuit. - 1 - RS-485 Communications White Paper

Bi-directional, half-duplex communication on a single twisted pair wire requires management of the data flow. If more than one device attempts to transmit at the same time, collisions will occur that result in data corruption. RS-485 transceivers allow the transmitter to be disabled, or tristated, so they are not driving the transmission line unless sending data. Bias resistors in the circuit force the signals to the idle state when the lines are not driven. When an RS-485 device sends data the transmitter must be enabled during transmission and disabled when transmission is complete to relinquish control of the RS-485 network. The EIA RS-485 specification does not stipulate the method for controlling the driver, therefore a number of alternatives have evolved. The objective of this paper is to outline the most common approaches and compare their effectiveness in minimizing risks of communication errors. The risk of communication error is directly related to the time required for a device to relinquish control of the RS-485 network once communication is complete so that other devices may send data without contention and data corruption. - 2 - RS-485 Communications White Paper

II. Common Methods Used to Control RS-485 Device CommunicationsRS-485 Transmitter Enable Control Methods A. Application Program Control (Under Windows) The earliest method of RS-485 driver control was via the application program. In the DOS era this method was reasonably effective and commonly implemented. The application program would simply write to an I/O location (usually the RTS signal) when transmission from that device was required. After sending the data the application would again write to the same address to turn off the driver. However, with today s protected mode operating systems (Windows), the application program can no longer directly access I/O locations. Instead, the application must call a device driver to handle the request through the operating system. The time required for the application to call the driver, the driver to execute the action, and then return control to the application is indeterminate but it can be relatively long. The longer this time is to relinquish, the higher the risk of bus contention from other devices. User application program controls RS-485 enable Windows requires driver level interface Timing through Windows is indeterminate and could result in bus contention - 3 - RS-485 Communications White Paper

B. One Shot Some RS-485 products use a technique called a one-shot to control the RS-485 enable signal. In a one-shot, a circuit is used to activate the enable signal upon transmission and then deactivate the signal using an RC circuit as a timer. The deactivation time for the enable depends on the R and C values used. Because the RC values are constant at all data rates these values must be set (sometimes using a jumper selection) to allow the enable to stay active for the slowest supported baud rate. This predetermined delay in deactivating the RS-485 enable could cause data error due to bus contention. Enable activated when data is transmitted RC values determine time before transmitter is disabled Predetermined RC values can result in data errors due to transmitter turning off too quickly or remaining enabled too long - 4 - RS-485 Communications White Paper

C. Enable Driven when Data Present With this hardware approach the transmitter data line is connected to the transmitter enable pin. This method relies on the RS-485 bias resistors to provide the high (logic 1) data signal. Since the enable signal may be disabled during part of a message (whenever a logic 1 is present on the data line) this method does not properly adhere to the RS-485 specification requiring that the enable signal be active only for the duration of message transmission. (Some RS-232 to RS-485 converters utilize this approach so determine their communication methodology before purchasing these devices.) Bias resistors provide high data signal Low data signal enables transmitter Doesn t adhere to RS-485 specifications - 5 - RS-485 Communications White Paper

D. Automatic Driver Control This advance in RS-485 transmission control uses asynchronous serial driver software that automatically recognizes commands to transmit data from an RS-485 port, enables the transmitter and immediately disables the transmitter at the end of the message. This method is more efficient than control from the application program and does not require the user to design the enable control into the application program. Does not require control from the user program Much faster timing through Windows Bus contention is unlikely This new approach in RS-485 transmission control was developed by Sealevel Systems and uses the company s SeaCOM asynchronous serial driver software. - 6 - RS-485 Communications White Paper

E. Automatic RS-485 Hardware Enable This latest approach is by far the easiest to use and eliminates any risk of bus contention and data corruption. This method uses hardware devices that are auto-enabled to control the RS-485 communications. Products with the auto-enable circuit do not require software control of the transceivers enable pin. Instead, hardware on the board enables the transmission line and then immediately disables the signal after the message is sent. Another method of hardware automatic driver enable is implemented through the use of certain advanced UARTs (e.g., 16C850) that have this function built right into the chip. These UARTs must be properly initialized to enable this feature. Application software control not required Software driver support is eliminated Auto-enable circuit keeps RS-485 signal active for the minimum required time Eliminates risk of bus contention This latest advancement is another innovation from Sealevel Systems. - 7 - RS-485 Communications White Paper

III. Conclusion System Designers need to be aware of the risks created by the various methods of controlling RS-485 communications. There is a higher risk associated with products that use outdated communication controls. (Often these are the lower priced products because they employ less sophisticated technology.) The latest RS-485 communication control technology pioneered by Sealevel Systems uses autoenabled hardware that eliminates the risk of bus contention and data corruption. - 8 - RS-485 Communications White Paper