Professional Documents
Culture Documents
Engineering Production
Management
Backup Printer
drive Internet
Firewall
Radio Radio/
PLC PLC RTU
tower Modem
DCS
Radio/ Radio
Flow Modem tower
Computer
Radio/
RTU
Modem
Transmitters/
Control valves
Figure 1
Information level
buses
Operator interface,
programming stations
Measured Variables
Process / Manufacturing
Information level buses are high level, high-speed networks used to connect engineering and
plant management offices together. Ethernet is a common example of this type of network.
Control level networks are high speed networks designed specifically for industrial control
applications, and transmit data between controllers and operator stations. Examples of this
network type include PROFIBUS FMS and ControlNet.
Field device networks are designed specifically for communications from (and sometimes
between) controllers to field devices such as transmitters, sensors and valves. Examples are Hart,
Foundation Fieldbus, Honeywell DE, PROFIBUS, DeviceNet and ASi.
In this course we will cover the basic concepts of data communications used in all 3 levels of
industrial data communications.
When communicating between two devices there are certain terms used to define the
components used in the transmission.
Device A Device B
4
DTE DCE DCE DTE
1 2 2 1
3 3
Example: Computers
PLCs
Controllers
Example: MODEM
Example: RS-232
RS-422
Example: wire
fibre-optic
radio
Glossary
protocol - A protocol is a set of rules that defines how the computers will manage
their communications. The protocol may specify how data is formatted for
transmitting and when and how each node may transmit
- A transfer rate estimated from the bit rate and length of each
character. If each character is 8 bits long and includes a start and
stop bit for asynchronous transmission, each character needs 10
bits to be sent. At 28,800 bps, data is transmitted at approximately
2800 cps.
- often called the Data Rate
Data Flow
Transmitter Receiver
Simplex Configuration
Data Flow
Transmitter Receiver
and and
Data Flow
Receiver Transmitter
Full-Duplex
Configuration
Serial Communications
CLOCK
DATA (61H)
BIT 7
0 1 1 0 0 0 0 1
MANY SYNCHRONOUS PROTOCOLS SEND MSD FIRST
Synchronous interfaces are useful for short links, for longer links,
synchronous formats may be less practical because of the need to
transmit the clock signal, which requires an extra line and is
subject to noise.
ASYNCHRONOUS TRANSMISSION
DATA (61H)
START BIT 0 BIT 7 STOP
BIT 1 0 0 0 0 1 1 0 BIT
ASYNCHRONOUS PROTOCOLS SEND LSD FIRST
Asynchronous Frame
MARK
IDLE
DATA BITS
LINE
SPACE
START OPTIONAL STOP BIT
BIT PARITY 1, 1.5, 2
BIT
Mark and Space parity are forms of Stick parity: with Mark parity,
the parity bit is always 1, and with Space parity, its always 0.
Solution: Bits Per Character 1 Start Bit 8 Data Bits 1 Stop Bit 10
2400 Bits Per Second
Characters Per Second 240
10 Bits Per C haracter
Question: Sketch the output for the above if a ‘?’ is being sent
SPACE
START 1 1 1 1 1 1 0 0 STOP
SPACE
Solution:
MARK
SPACE
START 0 0 1 0 1 0 1 STOP STOP
LSB MSB
Transmitter
Clock
Txd
Start Bit
Sequence of Events
1) Data is received from the CPU and stored in the holding register
2) Control logic calculates the parity bit and adds stop bits to Frame
3) Frame is loaded (in parallel) to the shift register
4) Shift register shifts the frame out in serial at a rate determined by the clock (determines
Baud rate)
Timing
Control
Logic
write
Connection to
Shift Data Buffer
Rxd CPU Data Bus
Register
Timing and control logic detects, and confirms a start bit then pulses serial data into shift
register. After all data is received, it is sent out (in parallel) to the buffer. This buffer is not
always required but gives the CPU more time to read the data before new data erases it. This is
called double buffering. The timing and control logic may also check for errors, parity or timing
errors. (looks for stop bits)
- The transmitter may add to data extra information for the receiver to
detect errors
- The receiver must then check for errors and then act on them (normally requests retransmission)
- There are three main methods used to detect errors
Parity Checking is a simple method of detecting errors in transmission. A parity bit is sent with
each word that is sent. This bit will make the number of ‘ones’ sent odd or even. If using even
parity, an even number of ones was sent and an even number ones must be received. This method
has relatively low overhead (10% or better), and is simple to calculate. It does have a problem in
that it cannot detect even number of errors.
2) Check Sums
A parity done on a block of data one bit for each bit position.
Lower overhead, more likely to detect errors than simple parity.
The data is added together and the result is sent as a data byte at the end (only LSB)
With this method, a block of data is sent, after that a CRC code is sent (typically 16 bits). This
method has a very good chance of catching any errors (99.9%+). One of the most popular methods
around, although its calculation is difficult.
EIA/TIA Standards
The Electronic Industry Association and the Telecommunications Industry Association (EIA/TIA) develop complete
standards for serial communications between DTE and DCE. The most popular standard is EIA/TIA-232E where
the E stands for the 5th revised version. This standard is usually referred as “RS – 232” where RS stands for
“recommended standard”. The recent adoption of the EIA/TIA is to help identify the source of the standard.
Other more commonly used standards are RS 422 and RS 485. Standards such as RS 423, 449 and 530 are also
discussed however, they are not used as much.
EIA/TIA 232 (RS-232E)
This standard is an upgraded version of RS-232C, which was introduced in 1962. It specifies three characteristics
for the interface between the host (DTE) and the peripheral (DCE) system. The three characteristics are as follows:
+15V +15V
Space logic 0 Space logic 0
ON ON
+5V
2V noise margin
+3V
Transition Transition
Region Region
-3V
2V noise margin
-5V
Mark logic 1 Mark logic 1
OFF OFF
-15V -15V
Figure 1 Voltage levels for RS 232E specifications
The receiver logic level is lowered by 2V to include a noise margin. Through voltage conversions, the +5 to +15V is
converted to 0V (space), and the –15 to –5 V is converted to a 5V (mark) to suit the TTL logic. (See Figure 2)
a. slew rate
The maximum rise and fall of voltage at the driver output is defined to be 30V/µs. This is for reducing the
crosstalk between adjacent signals.
b. Data rate
The maximum data rate is defined to be 20 kbps in order to reduce crosstalks. However, some
manufacturers modify this to a higher bit rate in order to satisfy today’s applications.
The RS 232 E specifies a new 26 pin alternative connector (known as ALT A connector). Other than having
a smaller size and an extra pin, the connector is exactly like the DB25 pin connector, which was
standardized in revision D (Fig. 3). Currently, pin 26 is not used.
The connector for DCE equipment is male for the housing and female for the connection pins. Similarly,
the DTE connector is a female housing with male connection pins. Most of the time, not all the pins are
used since not all the defined signals are used.
Another popular connector being used other than the 25-pin connector is the 9-pin DB9S
connector. It provides means to transmit and receive the necessary signals required.
Figure 3 Pin outs for DB 25 (female) connector and DB 9 (female) connector
25 - PIN CONNECTOR 9 - PIN CONNECTOR
1 1
PROTECTIVE GROUND 14 DATA CARRIER DETECT (DCD) 6
SECONDARY TD DATA SET READY (DTR)
TRANSMIT DATA LINE (TD) RECEIVE DATA LINE (RD)
TRANSMIT CLOCK REQUEST TO SEND (RTS)
RECEIVE DATA LINE (RD) TRANSMIT DATA LINE (TD)
SECONDARY RD CLEAR TOP SEND (CTS)
REQUEST TO SEND (RTS) DATA TERMINAL READY (DTR)
RECEIVER CLOCK RING INDICATE (RI)
CLEAR TO SEND (CTS) GROUND 9
LOCAL LOOPBACK 5
DATA SET READY (DSR)
SECONDARY RTS
SIGNAL GROUND
DATA TERMINAL READY (DTR)
DATA CARRIED DETECT (DCD)
REMOTE LOOPBACK
RESERVED
RING INDICATE (RI)
RESERVED
DATA RATE DETECT
UNASSIGNED
TRANSMIT CLOCK
SECONDARY DCD
TEST MODE
SECONDARY CTS 25
13
3. Functional Characteristics
RS 232 defines the functions of the different signals that are used in the interface. The functions of the pins are
categorized into 4 groups, namely, common (pin 7), data (pin2 and 3), control (pins 4 5,6,8,20) and timing. The pin
labels in Figure 3 demonstrates the various function of each pin. Only the underlined ones are relatively important
and will be discussed here.
RS 232 adopts an unbalanced transmission line system. In such a system, all devices share the same common ground
wire and transmit signals through separate single wire. Ideally, the system should work. However, the voltage along
the ground wire can vary along its length due to its capacitance and inductance. Moreover, the ground wire can pick
up noises as well. Consequently, the signal voltage at the receiving end can be distorted significantly.
This system is initially designed for pc printers and modems and is therefore only good for signal rates less than 20
kbps and over a distance of 15 m.
Tx Rx
Rx Tx
To overcome the shortfalls in the unbalanced transmission system, a balanced system is used. Such a system is used
in the RS-422 and RS-485, which will be discussed later. In a balanced system, a pair of wires is used for each
transmitting device. The differential voltage between the two wires is used as the input at the receiving end. Any
noise pick up along the lines will be cancelled out. This design allows for a higher data transfer rate over long
distances. However, installation cost is higher since the use of wire is doubled. Terminating resistors are also needed
to eliminate any reflections along the wire.
A(-)
Tx Rx
B(+)
A(-)
Rx Tx
Common ground
B(+)
Fig. 5 Electrical connections in a balanced transmission system
When connecting two devices together using RS-232 specified connections, the connection is straight through if
connecting a DTE to DCE.
Protective Ground
1 1 1 1
Transmitted Data Transmitted Data
2 2 2 2
4 RTS 4 4 4
5
CTS 5 5 5
DSR
6 6 6 6
Signal Ground 7
Signal Ground 7
7 7
DCD
8 8 8 8
DTR 20 20
20 20
RI 22 22
22 22
Sometimes, however, the control signals used for handshaking (telling each other if the other is ready to
communicate) are not supported by one or both devices. If one device does not support these control signals, the
other must receive ‘fake’ signals to allow communication to take place.
25-pin connector
1 1
Transmitted Data
2 2
3 Received Data 3
4 RTS 4
CTS
5 5
DSR
6 6
7
Signal Ground 7
DCD
8 8
20
DTR 20
22 22
Fig. 7 Electrical connections between DTE and DCE without full pin support
The connection, however, is made more complicated if the two devices are DTE. In this case, a null modem
connection must be made for communication to take place.
4 RTS 4 4 RTS 4
CTS CTS
5 5 5 5
DSR DSR
6 6 6 6
7
Signal Ground 7 7
Signal Ground 7
8
DCD 8 8
DCD 8
20
DTR 20 20
DTR 20
22 22 22 22
N.C. 1
2 RxD RxD 3
3 TxD TxD 2
5 GND GND 7
Remote RTS 4
(DTE device)
CTS 5 IBM Type
(DB - 9) PC
DTR 20 (DTE)
7 RTS
DSR 6 (DB-25)
8 CTS
DCD 8
Suggestion only
Consult device
manuals for
specific details
Fig. 9 Electrical connection between 9 pin and 25 pin connectors for DTE
This standard is an expansion of RS-232 with balanced transmission system. With such a system, it improves the
transmission characteristics as follows:
2 signal wires and 1 ground wire are necessary for a half duplex transmission and 4 signal wires and 1
ground wire are necessary for a full duplex transmission.
The system can support just 1 driver and a maximum of 10 receivers on a line.
A longer transmission distance can be achieved at the expanse of a lower transmission rate (< 100 kbps @
1000m).
The differential signal between the two conductors is maintained at 5V ( can be ranged between 0.2Vmin to
6Vmax). This allows the transmitters and drivers to be powered at 5V.
If the differential signal is bigger than +0.2 V, the receiver gives a specific logic state. If the differential
signal is lower than –0.2 V, the receiver gives an opposite logic state.
The line voltages in each line range between –6V to –2 V for a mark and +2 to +6 V for a space signal. A
noise margin of 1.8 V is adopted so that the line voltages at the receiving end vary between –6 V to –0.2 V
and +0.2 V to +6 V.
A terminating resistor is required at the end of the line to prevent any reflection of electrical signals along
the line that can cause signal distortion.
Note: RS-422 does not specify the mechanical connection specifications. It uses the 25 pin designation as
specified in RS-232 or 37 pin designation specified in RS-449 (explain later).
This standard is an extension RS-422 and is one of the most versatile one. It allows more transmitters and receivers
to be connected on the line. It uses 1 pair of signal wires (for both TxD and RxD) and 1 common ground wire (Fig.
11 and 12). Each signal wire carries a voltage with the same magnitude but opposite polarity (A is designated with a
– polarity and B with a + polarity). Its characteristics are as follows:
It allows 32 pieces of equipment to be connected together (multidrop networking). If there are more than 32
pieces, repeaters have to be used.
Its maximum signal transmission rate is 10 Mbps @ 10 m distance (just like RS-422).
A tristate output is used to achieve the multidrop function i.e. only 1 driver talks at each time. Other drivers
are disabled. A tristate output is one that the driver can deliver a logic 1, a logic 0 or no signal (Enable or
Disable.) When the driver is off, it is viewed as having a high impedance. The driver is considered to be
disconnected from the line.
Line voltages are –6 V to –1.5 V (logic 1 or mark) and +1.5V to +6V (logic 0 or space) at the transmission
end. Line voltages are –6V to –0.2V and +0.2V to +6V at the receiving end.
A logic one (mark) is outputted at the receiver if the differential output (A - B) > + 0.2 Vand a logic zero
(space) is outputted if A – B < -0.2 V.
When the differential input to the receiver is 0 V, the receiver output is indeterminate. This can cause a bit reading
error. A multi-drop termination (see Fig. 10) is hence installed at the end of the line. The termination biases the
receiver input to be about 50 mV so that the receiver output is guaranteed to be high (logic 1).
termination
resistor
R G
Circuit
R common
ground
G
Note: A two wire multidrop network supports a half duplex system, while a four wire multidrop network supports a
full duplex system.
This standard is not widely used in industry. It is an expansion of RS 232 with higher data rates. It uses unbalanced
transmission system. Both TxD and RxD have their own signal grounds allowing noise cancellations. The receiver
has a differential input.
TxD
Tx
terminating
Common resistor
Rx Rx up to 10 receivers
The data transmission rate is increased to 300 kbps @ 10m or <3kbps@1000m due to lower capacitance along the
line. The line can support 1 driver and a maximum of 10 receivers. Line voltage signals are:
The slew rate is faster since the voltage swing is from –6V to+6V instead of –25V to +25V. No mechanical
connections are specified under this standard.
This standard only modifies the mechanical connections and keeps the electrical and functional characteristics of RS
232. It specifies a 37-pin connector. It is gaining support from users of RS 422 and 485.
This standard is a simplification of the RS-449. It was simplified to fit a standard D-25 pin connector used by RS
232 while supporting fully balanced transmission. In all other respects, it is the same.
This interface card provides a communication link between the PC and the modem or other devices. On this card, an
IC chip called UART, which stands for Universal Asynchronous Receiver and Transmitter, is installed. The UART
usually is integrated to other chips. The first UART made was the 8250 chip. Newer versions have been
manufactured over the years. Nowadays, the most common ones that are installed in PCs are the 16450, 16550 and
16750 UARTS.
Most newer 486 and Pentium systems have 16550 UART equivalents included on the motherboard. Also, nearly all
high-speed internal modems have a 16550 UART equivalent on-board.
The 16550 UART has a 16-character FIFO (First-in, First-out) buffer. With a larger character buffer, it helps the
computer operating system keep up with the data stream without missing incoming characters.
For further references, you are advised to read the article published in the following website:
http://www.beyondlogic.org/serial/serial.htm