Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 6

Principles of Embedded Systems: ESE63201

Communication Media & Protocol Selection


DCE and DTE Devices
DTE stands for Data Terminal Equipment, and DCE stands for Data Communications Equipment.
These terms are used to indicate the pin-out for the connectors on a device and the direction of the
signals on the pins. A computer or a microcontroller is a DTE device, while most other devices such
as modem and other serial devices are usually DCE devices.

Serial Communication:

Synchronous data transfer


In program-to-program communication, synchronous communication requires that each end of an
exchange of communication respond in turn without initiating a new communication. A typical
activity that might use a synchronous protocol would be a transmission of files from one point to
another. As each transmission is received, a response is returned indicating success or the need to
resend.

Asynchronous data transfer


The term asynchronous is usually used to describe communications in which data can be transmitted
intermittently rather than in a steady stream. For example, a telephone conversation is asynchronous
because both parties can talk whenever they like. If the communication were synchronous, each party
would be required to wait a specified interval before speaking.

The difficulty with asynchronous communications is that the receiver must have a way to distinguish
between valid data and noise. In computer communications, this is usually accomplished through a
special start bit and stop bit at the beginning and end of each piece of data. For this reason,
asynchronous communication is sometimes called start-stop transmission.

RS232
RS-232 (Recommended standard-232) is a standard interface approved by the Electronic Industries
Association (EIA) for connecting serial devices. In other words, RS-232 is a long established standard
that describes the physical interface and protocol for relatively low-speed serial data communication
between computers and related devices. An industry trade group, the Electronic Industries Association
(EIA), defined it originally for teletypewriter devices. In 1987, the EIA released a new version of the
standard and changed the name to EIA-232-D. Many people, however, still refer to the standard as
RS-232C, or just RS-232.

Please acquaint yourself with the following:

RS232 on DB9 (9-pin D-type connector)

RS232 on DB25 (25-pin D-type connector)


RS232 on RJ-45

Limitations of RS-232
RS-232 has some serious shortcomings as an electrical interface.

Firstly, the interface pre-supposes a common ground between the DTE and DCE. This is a reasonable
assumption where a short cable connects a DTE and DCE in the same room, but with longer lines and
connections between devices that may be on different electrical busses, this may not be true. We have
seen some spectacular electrical events causes by "uncommon grounds".

Secondly, a signal on a single line is impossible to screen effectively for noise. By screening the entire
cable one can reduce the influence of outside noise, but internally generated noise remains a problem.
As the baud rate and line length increase, the effect of capacitance between the cables introduces
serious crosstalk until a point is reached where the data itself is unreadable.

Using low capacitance cable can reduce crosstalk. Also, as it is the higher frequencies that are the
problem, control of slew rate in the signal (i.e., making the signal more rounded, rather than square)
also decreases the crosstalk. The original specifications for RS-232 had no specification for maximum
slew rate.

Voltage levels with respect to ground represent the RS 232 signals. There is a wire for each signal,
together with the ground signal (reference for voltage levels). This interface is useful for point-to-
point communication at slow speeds. This is an example of point-to-point communication: one port,
one device. Due to the way the signals are connected, a common ground is required. This implies
limited cable length - about 30 to 60 meters maximum. (Main problems are interference and
resistance of the cable.) Shortly, RS 232 was designed for communication of local devices, and
supports one transmitter and one receiver.

RS422 and RS485


When communicating at high data rates, or over long distances in real world environments, single-
ended methods are often inadequate. Differential data transmission (balanced differential signal)
offers superior performance in most applications. EIA has recently released new serial interface, RS-
422 and RS-485. These standards were designed for high speed communication.

RS422 Serial Communication


RS422 is a Standard interfaces approved by the Electronic Industries Association (EIA), and designed
for greater distances and higher Baud rates than RS232. In its simplest form, a pair of converters from
RS232 to RS422 (and back again) can be used to form an "RS232 extension cord." Data rates of up to
100K bits / second and distances up to 4000 Ft. can be accommodated with RS422. RS422 is also
specified for multi-drop (party-line) applications where only one driver is connected to, and transmits
on, a "bus" of up to 10 receivers.

RS422 devices cannot be used to construct a truly multi-point network. A true multi-point network
consists of multiple drivers and receivers connected on a single bus, where any node can transmit or
receive data.
RS485 Serial Communication
RS485 is an Electronics Industry Association (EIA) standard for multipoint communications. It
supports several types of connectors, including DB-9 and DB-37. RS-485 is similar to RS-422 but can
support more nodes per line RS485 meets the requirements for a truly multi-point communications
network, and the standard specifies up to 32 drivers and 32 receivers on a single (2-wire) bus. With
the introduction of "automatic" repeaters and high-impedance drivers / receivers this "limitation" can
be extended to hundreds (or even thousands) of nodes on a network.

The RS-485 and RS-422 standards have much in common, and are often confused for that reason. RS-
485, which specifies bi-directional, half-duplex data transmission, is the only EIA/TIA standard that
allows multiple receivers and drivers in "bus" configurations. RS-422, on the other hand, specifies a
single, unidirectional driver with multiple receivers.

Converters
Converters in general can be used to change the electrical characteristic of one communications
standard into another, to take advantage of the best properties of the alternate standard selected.

For example, an Automatic RS232<=>RS485 converter, could be connected to a computer's RS232,


full-duplex port, and transform it into an RS485 half-duplex, multi-drop network at distances up to
4000ft. Converters in most instances, pass data through the interface without changing the timing
and/or protocol. While the conversion is "transparent" the software must be able to communicate with
the expanded network features. An "Automatic Converter" (RS232<=>RS485) will turn on the RS485
transmitter when data is detected on the RS232 port, and revert back into the receive mode after a
character has been sent. This avoids timing problems (and software changes) that are difficult to deal
with in typical systems. When full duplex is converted into half-duplex only one device at a time can
transmit data. Automatic Converters take care of the timing problems and allow fast communications
without software intervention.

I2C:
The I2C (Inter-Integrated Circuit) Bus is a two-wire, low to medium speed, communication bus (a
path for electronic signals) developed by Philips Semiconductors in the early 1980s. I2C was created
to reduce the manufacturing costs of electronic products. It provides a low-cost, but powerful, chip-to-
chip communication link within these products. Initial applications for I 2C included volume and
contrast control in radios and televisions. Over the past decade, I2C has expanded its communications
role to include a wide range of applications.

Today, I2C can be found in a wide variety of electronic applications, with almost unlimited growth
potential.

I2C Industry Standard


The “I2C Bus Specification,” published by Philips Semiconductor, provides a communication
protocol definition of the signal activity on the I2C Bus. This specification helps instruct
semiconductor device manufacturers, and electronic product developers, in the correct use of the
technology.
Prior to I2C, chip-to-chip communications used many wires in a parallel interface, often requiring ICs
(integrated circuits) to have 24, 28, or more pins. Many of these pins were used for inter-chip
addressing, selection, control, and data transfers. In a parallel interface, 8 data bits are typically
transferred from a sender IC to a receiver IC in a single operation.

I2C performs chip-to-chip communications using only two wires in a serial interface, allowing ICs to
communicate with fewer pins. The two wires in the I2C Bus are called Clock (SCL) and Data (SDA).
These two wires carry addressing, selection, control, and data, one bit at a time. The SDA wire carries
the data, while the SCL wire synchronizes the sender and receiver during the transfer. ICs that use the
I2C Bus can perform the same function as their larger parallel interface counterparts, but with far
fewer pins. This greatly reduces the size and cost of ICs based on the I2C Bus.

A second savings from the two-wire I2C Bus design is in printed circuit board (PCB) size and costs.
With ICs based on the I2C Bus needing far fewer wires (copper traces) for inter-chip
communications, circuit boards using I2C ICs are greatly reduced in size, complexity, and cost.

Although cost savings alone would be enough to make the I2C Bus a success, its developers were also
charged with creating a powerful communication link. I2C meets this challenge by supporting several
powerful features.

Master-Slave Hierarchy
I2C devices are classified as master or slave. A device that initiates a message is called a master,
while a device that responds to a message is called a slave. A device can be master-only, slave only,
or switch between master and slave, as the application requires.

Multiple Devices
I2C can connect many ICs on just two-wires. Each I2C slave device has its own unique slave address.
When a master sends a message, it includes the slave address at the beginning of the message. All
devices on the bus hear the message, but only the slave that recognizes its own address participates in
the transfer.
Multi-Master Support
I2C also supports multiple master devices on the bus at the same time, a powerful feature that
optimizes bus use by keeping bus message traffic to a minimum. To support multiple masters, I2C
must resolve signal conflicts, should two or more master devices try to talk on the bus at the same
time. This feat, called bus arbitration loss detection, allows a master to detect when its bus signals are
conflicting with those of another master. A master that detects arbitration loss terminates its use of the
bus, allowing the message generated by another master to cross the bus unharmed.

MODBUS Protocol:
Modbus is a serial communications protocol published in 1979 for use with its programmable logic
controllers (PLCs). Simple and robust, it has since become one of the de facto standard
communications protocols in the industry, and it is now amongst the most commonly available means
of connecting industrial electronic devices. The main reasons for the extensive use of Modbus in the
industrial environment are:

 It has been developed with industrial applications in mind


 It is openly published and royalty-free
 It is easy to deploy and maintain
 It moves raw bits or words without placing many restrictions on vendors

Modbus allows for communication between many (approximately 240) devices connected to the same
network, for example a system that measures temperature and humidity and communicates the results
to a computer. Modbus is often used to connect a supervisory computer with a remote terminal unit
(RTU) in supervisory control and data acquisition (SCADA) systems. Many of the data types are
named from its use in driving relays: a single-bit physical output is called a coil, and a single-bit
physical input is called a discrete input or a contact.

The development and update of Modbus protocols are managed by the Modbus Organization, formed
of independent users and suppliers of Modbus compliant devices.

Each device intended to communicate using Modbus is given a unique address. In serial and MB+
networks only the node assigned as the Master may initiate a command, but on Ethernet, any device
can send out a Modbus command, although usually only one master device does so. A Modbus
command contains the Modbus address of the device it is intended for. Only the intended device will
act on the command, even though other devices might receive it (an exception is specific
broadcastable commands sent to node 0 which are acted on but not acknowledged). All Modbus
commands contain checking information, ensuring that a command arrives undamaged. The basic
Modbus commands can instruct an RTU to change a value in one of its registers, control or read an
I/O port, as well as commanding the device to send back one or more values contained in its registers.

IP Protocols:
TCP/IP

UDP – Unicast

UDP- Multicast

UDP – Broadcast

Optical Fibre (fibre optic)


Optical fibre (or "fibre optic") refers to the medium and the technology associated with the
transmission of information as light pulses along a glass or plastic strand or fibre. Optical fibre carries
much more information than conventional copper wire and is in general not subject to electromagnetic
interference and the need to retransmit signals. Most telephone company long-distance lines are now
made of optical fibre. Transmission over an optical fibre cable requires repeaters at distance intervals.
The glass fibre requires more protection within an outer cable than copper. For these reasons and
because the installation of any new cabling is labour-intensive. A type of fibre known as single mode
fibre is used for longer distances; multimode fibre.

OF links are extensively used in noisy environments as a channel between a controller and a machine
located in a harsh environment or between a data collection and monitoring station and a sensor in a
noisy environment.

You might also like