0% found this document useful (0 votes)
74 views4 pages

A Control System Using Parallel Interface.: Microprocessor Controller

The document introduces microprocessor-based control systems using parallel and serial interfaces to connect sensors, motors, and other devices to a microprocessor controller. It describes how a parallel interface works using multiple ports to read input switches and send output signals, while a serial interface transmits data one bit at a time over a single wire using converters and standard formats. The document also discusses the RS-232 serial communication standard for connecting devices like computers and modems.

Uploaded by

novo order
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
74 views4 pages

A Control System Using Parallel Interface.: Microprocessor Controller

The document introduces microprocessor-based control systems using parallel and serial interfaces to connect sensors, motors, and other devices to a microprocessor controller. It describes how a parallel interface works using multiple ports to read input switches and send output signals, while a serial interface transmits data one bit at a time over a single wire using converters and standard formats. The document also discusses the RS-232 serial communication standard for connecting devices like computers and modems.

Uploaded by

novo order
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

INTRODUCTION TO MICROPROCESSOR-BASED CONTROL 39

Figure 2.9
A control system Microprocessor
using parallel controller
Analog
interface. drive
DAC Motor Motor Load
Output port control
Adr = 00
Direction
Alarm

Input port Switches to input


Adr = 01 set point in binary.
Gnd = logic 0
open = logic 1

Input port
Adr = 02 ADC Sensor

Limit switches

Input port
Adr = 03 Start

Stop Front panel

Go-to position
40 CHAPTER 2

switches. The limit switches are used as a “back up” to detect it if the load has gone out
of its designated range.
Operation of the system proceeds as follows: The controller inputs the data from
port 03 to determine if the start (or stop) button has been pressed. If the start button has
been pressed, then the set point is read in from port 01 and the digitized sensor data is
read in from port 02. Based on its control strategy, the controller outputs to port 00 a
binary word representing the motor-control voltage. This digital data is converted to an
analog voltage with the DAC. This entire sequence is repeated over and over until the
stop button is pushed.

The Serial Interface


In a serial interface, the data are sent 1 bit after the other on a single wire. There are
a number of good reasons for doing this. First, the cabling is simpler because only two
wires are needed (at a minimum), those being “data” and “return.” Second, shielding a
small group of wires, which is often necessary in an electrically noisy industrial envi-
ronment, is easier. Third, serial data can make use of existing single-channel data lines
such as the telephone system (which may require using a modem). For these reasons,
serial data transfer is usually recommended for distances greater than 10-30 ft.
Because data always exist in a parallel form inside the computer, it must be con-
verted to serial data before coming out the serial port. This is accomplished with a spe-
cial parallel-to-serial converter IC called a universal asynchronous receiver
transmitter (UART). On the other end of the line, a receiver must convert the serial
data back into parallel data, which is done with another UART. Figure 2.10 shows the
basic serial data circuit.
Serial data are classified as being either synchronous or asynchronous. Synchronous
data require that the data bytes be sent as a group in a “package.” It is used in sophis-
ticated communication systems that move a lot of data and will not be further discussed
here. Asynchronous data transfer is the more common (but slower) type of serial trans-
fer and allows for individual bytes to be sent when needed.

Figure 2.10
Components in a Microprocessor
serial interface controller
circuit. Parallel-to- Serial data Serial-to-
serial parallel Parallel
Parallel data
converter converter data
(UART) Return (UART)
INTRODUCTION TO MICROPROCESSOR-BASED CONTROL 41

Figure 2.11

r it SB

)
t1 B

t(s
Bi LS
t0 t

Pa M
Bi t bi
Serial data format

bi
y
op
t2
t3
t4
t5
t6
t7
ar
for the binary word

St

St
Bi
Bi
Bi
Bi
Bi
Bi
10110010 (with
even parity). 1
0
Time

Figure 2.11 shows the standard format for asynchronous serial data. First, a start
bit is sent, then the data (LSB first), then a parity-error checking bit, and finally the stop
bit(s). Some variation is allowed to this format, but both transmitter and receiver must
use the same format. The other important parameter in serial transmission is the num-
ber of bits sent per second (frequently called the baud rate, although the term is tech-
nically incorrect in most cases). Standard bit rates are 300 bps (bits per second), 1200
bps, 2400 bps, 9600 bps, 14,400 bps 28,800 bps, 33,600 bps, and 57,600 bps. Serial
data transmission is much slower than parallel transmission. At 300 bps, it takes almost
37 ms to transmit 1 byte of data, compared to less than a microsecond for parallel—
this is thousands of times slower. Still, for many applications, particularly process con-
trol, the longer data-transfer times are not a problem.

RS 232
In order to make the serial interface practical, a set of specifications called the RS-232
standard was established. Officially, the RS-232 standard specifies the serial data inter-
face between data terminal equipment (DTE) and data communication equipment
(DCE). A common application of RS-232 is the interface between a PC and the
modem, in which case the computer is the DTE and the modem is the DCE [see Figure
2.12(a)] A modem is a device that converts digital data into audio tones so that it can
be transmitted over the telephone lines. As shown in Figure 2.12, the RS-232 interface
consists of seven signals; the serial data is sent on pin 2 and received on pin 3; the other
signals, such as “Request to send” and Clear to send,” are used to confirm that the two
units are ready to communicate. The RS-232 standard specifies connector types, signal
names, pin numbers, and voltages. In practice, the RS-232 standard can be applied to
any serial interface as long as one unit acts as a DTE and the other as a DCE. If two
DTE units need to interface with each other—for example, a PC to a PC—a special
cable called a null modem or crossover cable is used. RS-232 is commonly used in
the control field when two units need to exchange data—for example, to connect a PC
to a local control unit for the purpose of downloading a new control program, as illus-
trated in Figure 2.12(b).
RS-232 serial data transfer is somewhat more complicated than parallel data trans-
fer, but it offers advantages such as two-wire communications and a universally
accepted interface. The hardware to handle serial data is standardized, readily available,
and reliable.
42 CHAPTER 2

Figure 2.12 DTE RS-232 DCE


The RS-232
serial interface. Phone
Transmitted data lines
2 2
Received data
3 3
Request to send
4 4
Clear to send
5 5 Modem
Data set ready
6 6
Data terminal ready
20 20
Ground
7 7
Computer

(a) Interface between data terminal equipment (DTE) and data communication
equipment (DCE). Serial data are transferred on pins 2 and 3; the other signals control
the flow of data.

RS 232 Cable
T
OU
IN
trol
Con it
PC Un

COM port (DTE) (DCE)


(b) Using an RS-232 serial cable to connect a PC to a controller

Networking
Probably the most common use of serial data is in networking. More and more, net-
works are being used to interconnect all the units and devices in the control system.
Network cabling differs depending on the type of local area network (LAN), but
most use the generalized bus system diagrammed in Figure 2.13. Typically, each unit
on the net has a unique address number and also address detection circuitry. When
one unit wants to talk to another unit, it first broadcasts the address of the unit its
wants to talk to (serially, of course, on the signal wire) and then sends the data (seri-

You might also like