Sie sind auf Seite 1von 33

Ch-03

HARDWARE REQUIREMENTS

COMPUTER

Chapter 03

COMPUTER HARDWARE REQUIREMENTS FOR


REALTIME APPLICATIONS
1. INTRODUCTION:
Based on the nature of the real time application and the operations involved
the computer hardware is selected.
The general types of computers that are used for the purpose are as follows:
i. General purpose processors like microprocessors and
microcontrollers.
ii. Digital signal processors.
iii. Parallel processors.
iv. RISC.

2. GENERAL PURPOSE COMPUTER:


The basic characteristics of the general purpose processors are as follows:
i.
Processing power
ii.
Storage capacity
iii.
Input/output bandwidth
iv.
Interrupt structure
The main advantage of using general purpose processors is that they are
modular, i.e. it facilitates the inclusion of additional units to the processor.
The basic block diagram of the general purpose processor is as shown in fig
(3.1)
The basic components are :
i.
Central processing unit
a. General purpose registers(GPR)
b. Arithmetic and Logic unit(ALU)
c. Control unit(CU)
ii.
Memory
iii.
Input/output devices
iv.
Bus
i. Central Processing Unit:
a. General purpose registers(GPR):
Used to store temporary data
Results in faster computation
b. Arithmetic Logic Unit(ALU):
Consists of hardware circuits to perform arithmetic and logical
operations.
May also consist of complex hardware like multipliers, floating pint
operators
c. Control Unit(CU):
1

Ch-03
HARDWARE REQUIREMENTS

COMPUTER

Supervises the CPU operations.


Fetches the instructions from the program memory, decodes the
same.
Provides the timing required for entire computer operations.

GPR

ALU

CU
DATA

ADDRESS

CONTROL

Main Memory

I/O Peripherals

Peripherals

Fig (3.1): Basic block diagram of general purpose processor.


The basic CPU features are as follows:
WORDLENGTH: Ensures precision in calculations.
Small word length leads to faster access
Large word length leads to large access area to
memory
INSTRUCTION SET:
Small instruction set leads to reduced
storage requirements
Powerful instruction set causes the
complexity of assembly
level programming and hence
high level language has to be used.
ADDRESSING METHODS: Required features are as follows:
Direct and immediate addressing;
Relative addressing modes;
Index addressing modes;
Memory addressing modes;
2

Ch-03
HARDWARE REQUIREMENTS

COMPUTER
Single commands to carry out multiple operations.

NUMBER OF REGISTERS
INFORMATION TRANSFER RATES: The transfer rate is the ability
to carry out operations in parallel with the processing of data, and
the ability to communicate with a large range of devices and is
very important factor in process control.
INTERRUPT STRUCTURE: it should be flexible, efficient and
multi-level in nature.
ii. Memory:
The computer memory can be divided into two main categories:
a. Fast access storage(primary memory)
b. Auxiliary storage (secondary memory)

a. Fast access storage:

Contains data, programs and results which are currently used by the
CPU.
The different types of memories are:
RAM (random access memory read/write)
ROM (read-only memory),
PROM (programmable read-only memory)
EPROM (electronically programmable read-only memory)
FLASH
The above memories store critical code or predefined functions.

b. Auxiliary storage:

They provide bulk storage for programs or data which are required
infrequently at a much lower cost than fast access memory.
The limitation is longer access time and the need for interface boards
and software to connect them to the CPU.
Operate asynchronously to the CPU.

NOTE:
A. Generally the ROMs are used for memory protection and to prevent loss of
programs.
B. Alternative to ROM is the use of memory mapping techniques that trap
instructions which attempt to store in a protected area.
iii.

Input/output devices:
Various types of devices are connected to the processor and each has its own data transfer rates.
The I/O system of most control computers can be divided into three sections:
a) Process I/O;
b) Operator I/O;
c) Computer I/O.

iv.

Bus:

Ch-03
HARDWARE REQUIREMENTS

COMPUTER

There are 3 types of buses:


a) Mechanical: collection of conductors which carry electrical signals
and provide point to point connection.
b) Electrical: it concerns the signal levels, loading and the type of
output gates (open-collector, tri-state).
c) Functional: describes the type of information flowing in the bus
The bus lines can be divided into three functional groups:
a) Address lines: details of where the information is to be sent/ received.
b) Data lines: contains the information.
c) Control and status lines: indicates when the operation has to be performed.

3. MICROCONTROLLERS:
Microcomputers have all the components necessary for a complete
computer on a single chip.
A typical single-chip device, microcontroller is as shown in Figure (3.2).

Oscillator

Hardware
Timers

CPU

Interrupt
Controller

EPROM

Serial
Communicatio
n Controller

RAM

I/O Ports

External Bus

Fig (3.2): Microcontroller Schematic


The microcontroller consists of small amount of EPROM and an even
smaller amount of RAM, and is dedicated for small, simple applications. The
memory can be extended by using external memory chips.
The microcontroller is specifically intended for embedded computer control
applications.
The chip can also include additional circuits like real-time clock generator
and a watch-dog timer.

4. SPECIALIZED PROCESSORS:
The main reasons for using special purpose processors are:
a. Safety-critical applications
4

Ch-03
HARDWARE REQUIREMENTS

COMPUTER

b. Increased computation speed.


For safety-critical applications, reduced instruction set computer (RISC) is
used.
The advantage of using RISC are :
a. The formal verification (using mathematical proofs) is easier.
b. Easier to write assemblers and compilers.
For increased computation speed we use Harvard computer architecture
which has one CPU and separate memory for program and data.
Some of the specialized computers are:
a. Parallel computers
b. Digital Signal Processors
a. PARALLEL COMPUTERS:
The parallel computers can be categorized into three types:
a. SIMD: Single Instruction Stream, Multiple Data Stream
b. MISD: Multiple Instruction Stream, Single Data Stream
c. MIMD: Multiple Instruction Stream, Multiple Data Stream

Fig (3.3): SISD Computer Architecture

The above figure illustrates a single instruction stream single data


stream (SISD) computer architecture. The architecture clearly depicts the
exclusive paths for instruction (between the control unit and the processor
unit) and data (between the processor unit and the memory block).
The first type of parallel computers that were visualized was the SIMD and
the same is illustrated in the fig (3.4). From the figure we can infer that there
were multiple data paths and a single instruction path. The parallel system
resulted fast computation, but the major disadvantage was that there was
difficulty in sharing the program codes to the several processor units that
were part of the SIMD system.

Ch-03
HARDWARE REQUIREMENTS

COMPUTER

Fig (3.4): SIMD Computer Architecture

A solution to the problem of SIMD architecture was the MISD computer


architecture as illustrated in fig (3.5), which consisted of separate control
units, which addressed the issue of distribution of program codes to the
multiple processor units. But the data path was shared between the several
processor units. This resulted in resource sharing problem of the data path. If
not addressed effectively the data path would be congested.

Fig (3.5): MISD Computer Architecture

An alternate to the SIMD and MISD architectures was the MIMD architecture
which has separate instruction and data paths. The same is illustrated in fig
(3.6). An example of MIMD architecture is the INMOS transputer.

Ch-03
HARDWARE REQUIREMENTS

COMPUTER

Fig (3.6): MIMD Computer Architecture

b. DIGITAL SIGNAL PROCESSORS:

Specific applications such as speech processing, telecommunications, radar and hi-fi systems
require that the bandwidth of the signals be processed at a very high processing speed.

And for thus purpose special purpose integrated circuits optimized to meet the signal processing
requirements are used.

The ICs exploit the Harvard architecture.

DSPs typically use fixed point arithmetic and the instruction set contains
instructions for manipulating complex numbers.

There are very few high-level language compilers.

5. PROCESS RELATED INTERFACES:


The interface devices can be categorized into the following types:
a. Digital quantities
b. Analog quantities
c. Pulses and pulse rates
d. Telemetry
a. Digital quantities :
The signals can be either binary or BCD in nature.
Examples: To close or open the valve, to switch on or off (binary).
Digital voltmeter output (BCD).
b. Analog quantities:
The signals are continuous variables and needs to be sampled and
converted to a digital value.
Example: Outputs of thermocouples, strain gauges, etc.,
7

Ch-03
HARDWARE REQUIREMENTS

COMPUTER

c. Pulses and pulse rates:


A number of measuring instruments, particularly flow meters, provide
output in the form of pulse trains.
d. Telemetry:
The data is transmitted by landline, radio or the public telephone network.
It is sent in serial form, and is generally encoded in standard ASCII
characters.
a. Digital Signal Interfaces:
Input Interface:
The digital input interface is as shown in fig (3.7). The plant output signals
to the processor are the logic signals and they appear onto the digital
input register.
The data transfer from the plant to the processor involves one word at a
time.
The number of bits in the digital input register will be equal to the number
of bits in the computer word.
The voltage levels on the input lines are generally 0 and + 5 V.

Fig (3.7): Digital input interface

Read Operation:
The computer places the address of the register onto the
address bus and is decoded by the decoding circuit. The
address decoder sends a SELECT signal to the register.
8

Ch-03
HARDWARE REQUIREMENTS

COMPUTER

An ENABLE signal from the computer control bus is used to


enable the register.
In response to both the 'select' and 'enable' signals the
digital input register enables its output gates and puts data
onto the computer data bus. The digital input register puts
the data onto the data bus only when it is selected and
enabled; if data is put onto the bus at any other time it will
corrupt data intended for other devices.
All these operations are governed by the processor clock.
An example of the read operation is as shown in Figure (3.8).
The address is put onto the address lines at the beginning
of the cycle T1 and they are guaranteed to be valid by the
start of cycle T2.
Simultaneously at the start of cycle T2 the READ line
becomes active.
The digital input register then places the data in data bus
at the negative-going edge of T3 cycle and the data must
remain on the data lines until the negative-going edge of
T4 cycle.

Fig (3.8): Timing diagram of Read Operation

Ch-03
HARDWARE REQUIREMENTS

COMPUTER

Note:
1. The digital input interface in fig (3.7) enumerates a system in which the
plant provides the data only when the processor prompts.
2. There are advanced systems in which the plants interrupt the processor
when the data is ready for transfer.
Output Interface:
Digital output requires a register or a latch to hold the data output from the
computer, as shown in fig (3.9).
The data in the register must not change when the data on the data bus
changes, but rather should change only when the specific register is
addressed.
The ENABLE signal from the processor indicates the device that the data is
available on the data bus and can be read.
The register output is a set of logic levels, typically 0 to + 5 V
NOTE: The digital input and output interfaces described above can be used to
accept BCD data from instruments.

(3.9): Digital output interface

b. Analog Signal Interfaces:


Input Interface:
The analog signals are converted to digital signals by two operations:
sampling and quantization.
10

Ch-03
HARDWARE REQUIREMENTS

COMPUTER

As is shown in fig (3.10) analog-to digital converters (ADCs) include samplehold circuit.
To read data from the analog input interface, the processor issues a SAMPLE
signal.
After the sampling process is over, quantization process commences.
After the conversion process is complete the ADC sends a CONVERSION
COMPLETE signal to the processor.
The ADCs are not cost effective; hence multiplexers are used to interface
multiple devices to the processor.
NOTE: 1. If the signals are in the volt range then solid state devices are used for
multiplexers.
2. If the signals are in the mill volt range then mercury wetted reed relays
are used in place multiplexers.
Note: Reed Relays:
A reed relay has a set of contacts inside a vacuum or inert gas filled glass tube,
which protects the contacts against atmospheric corrosion. The contacts are closed
by a magnetic field generated when current passes through a coil around the glass
tube. Reed relays are capable of faster switching speeds than larger types of relays,
but have low switch current and voltage ratings.
Mercury wetted reed relays:
A mercury-wetted reed relay is a form of reed relay in which the contacts are wetted
with mercury. Such relays are used to switch low-voltage signals (one volt or less)
because of their low contact resistance, or for high-speed counting and timing
applications where the mercury eliminates contact bounce. Mercury wetted relays
are position-sensitive and must be mounted vertically to work properly. Because of
the toxicity and expense of liquid mercury, these relays are rarely specified for new
equipment.

Fig (3.10): Analog

input interface

Output Interface:
It requires the conversion of digital signals into analog signals.
11

Ch-03
HARDWARE REQUIREMENTS

COMPUTER

Digital-to-analog conversion is cost effective and hence exclusive DAC is


provided to each output de device.
Figure (3.11) shows a typical analog output system.

Fig (3.11): Analog output interface


Each DAC is connected to the data bus and the appropriate channel is
selected by using the address from the processor address bus.
The DAC acts as a latch and holds the previous value sent to it until the next
value is sent.

c. Pulse Interfaces:
Input and Output Interface:
12

Ch-03
HARDWARE REQUIREMENTS

COMPUTER

In its simplest form a pulse input interface consists of a counter connected to


a line from the plant. The counter is reset under program control and after a
fixed length of time the contents are read by the computer.
A typical arrangement is as shown in Figure (3.12).
The measurement of the length of time can be done by a logic circuit
interface or by the processor itself.
The output pulses can take one of the following forms:
i.
Fixed duration pulse series
ii.
Variable length single pulse
iii.
Pulse width modulation.
The most common applications of the pulses are the hardware timers and the
watchdog timers.

Fig (3.12): Pulse input and output interface

d. Real-Time Clock:
Definition: It is an auxiliary device used in computer control applications,
and consists of a pulse generator with a precise controlled frequency.
Generally the frequency can be sourced from either the ac supply line or from
an external hardware circuit- fixed frequency pulse generator.
13

Ch-03
HARDWARE REQUIREMENTS

COMPUTER

The real time clock decrements a counter and when it reaches zero,
generates an interrupt and reloads the count value.
The Interrupt activates the real-time clock software.
The interval at which the timer generates an interrupt, and hence the
precision of the clock, is controlled by the count value loaded into the
hardware timer.
Disadvantage:
If the precision of the real time clock is high, then the CPU will spend a
large amount of time servicing the clock and will not be able to perform '
any other activity.
In real-time clock based on the use of an interval timer and interruptdriven software, the clock stops when the power is lost and on restart the
current value of real time has to be loaded.

6. DATA TRANSFER TECHNIQUES:


The various I/O devices can be connected to the processor in the following
manners (i.e., it describes the method by which the processor services the
devices):
1. Programmed Transfer: it involve the direct control of the devices by the
CPU and provides optimum flexibility. But the various devices operate at
various operating speeds and the presence of several devices makes this
technique less effective.
The programmed transfer involves the following techniques:
I.
Polling
II.
Interrupts
2. Direct Memory Access: the data transfer requirements are set up using
the program codes, but the data transfer happens directly between the
device and the memory with out the involvement of the CPU.
3. I/O processors: it involves the use of specific processors which cater to
the needs of I/O data transfer by means of providing buffer.
I.
Polling:
Here the processor manually checks the device status continuously in a loop
to identify the device which requires the processors service.
When multiple devices are present, the processor checks serially the device
status.
The same is illustrated in the fig (3.13).
Sufficient care should be taken during the design of time delays as the delay
must be more than the maximum expected delay of the device.
The disadvantage of the technique is that the processor spends most of the
time in the loop rather than providing servicing.
The devices cannot request processor services, but have to wait till the
processor checks the status.

14

Ch-03
HARDWARE REQUIREMENTS

COMPUTER

Fig (3.13): Conditional Transfer (Busy Wait)

An alternative to the system is the use of conditional transfer as illustrated


in the fig (3.14).
In this process the processor checks for the status, if the devices are not
ready then the processor instead of waiting in a loop goes on with servicing
internal programs.
Care has to be taken during programming such that all the devices are
checked at frequent intervals.

15

Ch-03
HARDWARE REQUIREMENTS

COMPUTER

Fig (3.14): Conditional Transfer


II.
Interrupts:
In this technique the processor does not check for the device status to service,
rather the devices request the processor for its service.
In this method the internal execution of the program is temporarily stopped to
allow the device service program or the interrupt service routine (ISR) to run.
After the execution of the routine is finished the program which was temporarily
suspended is resumed. The same is illustrated in the fig (3.15).

Fig (3.15): Interrupt driven program control transfer


Interrupts are used in most of the real-time computer systems.
They are used for:
i.
Real-time clock
ii.
Alarm inputs

16

Ch-03
HARDWARE REQUIREMENTS
iii.
iv.
v.
vi.
vii.

COMPUTER

Manual override
Hardware failure indication
Debugging aids
Operating systems
Power failure warning

Context Switching:
An interrupt can occur during any part of the execution of a program.
Due care should be taken such that temporary information in the CPU
registers called the context, should not be overwritten during the execution of
the ISR.
When there is an interrupt the following vital steps are taken by the processor
after the execution of the current instruction:
i.
Save all the CPU registers-0program status word, registers and
address of the next instruction in the program counter (PC).
ii.
Load new context to switch to a new function.
The above steps are known as the context switching.
The methods commonly used for context switching are:
i.
Store the contents of the registers in a specified area of memory.
ii.
Store the registers on the memory stack.
iii.
Use of an auxiliary set of registers exclusively for context switching.
The following steps are followed after the execution of the ISR:
i.
Before return from the ISR, retrieve the previously saved status word,
registers and other context parameters.
ii.
Retrieve into the PC the saved PC from wherever it is stored.
iii.
Execute the remaining part of the function, which was interrupted.
Interrupt input mechanism:
A simple form of interrupt input is as shown in Figure 3.16.
In between each instruction the CPU checks the IRQ line.
If it is active, an interrupt is present and the interrupt service routine is
entered; if it is not active the next instruction is fetched and the cycle
repeats.
A common arrangement is to have two interrupt lines as shown in Figure
3.17:
IRQ: can be enabled and disabled using software
Non-mask able interrupts (NMI): cannot be turned off by
software
The number of interrupts can be increased by means of an OR gate.

17

Ch-03
HARDWARE REQUIREMENTS

COMPUTER

Fig (3.16): Flowchart of basic interrupt mechanism

18

Ch-03
HARDWARE REQUIREMENTS

COMPUTER

Fig (3.17): Basic interrupt system

Interrupt response mechanisms:


Generally the CPU responds to the interrupt in the following methods:
i.
Transfer control to a specified address - usually in the form of a 'call'
instruction.
ii.
Load the program counter with a new value from a specified register or
memory location.
iii.
Execute a 'call' instruction but to an address supplied from the external
system.
iv.
Use an output signal - an Interrupt Acknowledge - to fetch an instruction
from an external device.
Methods 1 and 2 are software based- they rely on software to determine the
interrupt source and the appropriate interrupt service routine.
Methods 3 and 4 are hardware based - they require external hardware to
identify the interrupt source and can transfer program control directly to the
appropriate interrupt service routine.
In method 2 the address of the ISR is stored in specified memory locations;
the address stored here is called the interrupt vector or interrupt response
vector
Hardware vectored interrupts:
Methods 3 and 4 in the previous discussion require the use of some form of
vectored interrupt structure to identify which of the external devices has
generated an interrupt.
They also require a mechanism to arbitrate between multiple interrupts to
prevent more than one interrupt activating the IRQ at anyone time. This is
done by assigning priorities to the various interrupts.
Commonly daisy chain is used for arbitrating among the interrupts.

19

Ch-03
HARDWARE REQUIREMENTS

COMPUTER

In this technique an 'acknowledge' signal is propagated through the devices


until it is blocked by the interrupting device.
The device priority is determined by the position of the device in the chain
and cannot be changed by the software.

Fig (3.18): Interrupt vectoring using priority encoding circuit


An alternate method to the daisy chain method is the use of the priority
encoder circuit, as illustrated in fig (3.18). the working principle is:
i.
Any interrupt occurring on any line causes the interrupt line
(IRQ) to become active and places a three-bit code specifying
the number of the interrupt line which is active on the data bus.
ii.
When more than one line is active then the priority encoder
supplies the number of the highest priority interrupt.
Interrupt Response Vector:
The interrupt response vector can be in the following forms:
a. Instruction
b. Address of the ISR
c. Address of a pointer to an ISR
d. The device interrupting, supplies this address.
Multi Level Interrupts
A typical structure of multi-level interrupts is as shown in Figure.3.19.
With reference to the figure.3.19 the main task is interrupted at regular
intervals by the clock interrupt which is the highest-priority interrupt of level
0.
When the interrupt occurs control is passed to the clock ISR 0 - at 1, 2 and 3
in Figure 3.19.
During the servicing of the clock interrupt, the printer generates an interrupt
request (4), but since the printer is of lower priority than the clock the
interrupt is not dealt with until the clock routine ISR 0 has finished.
When this occurs, instead of control returning to the, main program it passes
to the printer service routine ISR I (5).
The printer service routine does not complete before the next clock interrupt,
so it is suspended (6) 'while the next interrupt from the clock is dealt with. At
the termination of the clock routine return is made to the printer (7) and

20

Ch-03
HARDWARE REQUIREMENTS

COMPUTER

finally, when the printer ISR finishes, a '.return is made to the main program
(8).

Fig (3.19): Multi Level Interrupts


It is very necessary that the feature of interrupting a ISR should be restricted
to higher priority interrupts than the routine executing.
To achieve this, the lower priority interrupts are masked. Masking is achieved
automatically in the daisy-chain system.
An alternative to use a mask register which can be loaded from software and
is used to mask the lower-priority interrupt lines and is shown in Figure 3.20.

Fig (3.20): Interrupt masking

2. Direct Memory Access

21

Ch-03
HARDWARE REQUIREMENTS

COMPUTER

DMA is an essential feature which allows the devices to transfer data


without subjecting the CPU to a heavy overhead.
Otherwise, the CPU would have to copy each piece of data from the
source to the destination, making itself unavailable for other tasks.
This situation is serious because access to I/O devices over a peripheral
bus is generally slower than normal system RAM.
With DMA, the CPU gets freed from this overhead and can do useful tasks
during data transfer.
Three methods are normally used
i.
Burst mode: The DMA controller takes over the data bus of the
computer and locks out the CPU for the period of time necessary to
transfer, say, 256 bytes between fast memory and backing
memory. The use of burst mode can seriously affect the response
time of a real-time system to an external event and because of this
may not be acceptable.
ii.
Distributed mode: The DMA controller takes occasional machine
cycles from the CPU's control and uses each cycle to transfer a byte
of information between fast memory and backing memory.
iii.
The cycle-stealing method: Data transfer happens only during
cycles when the CPU is not using the data bus. Therefore the
program proceeds at the normal rate and is completely unaffected
by the DMA data transfers. This is, however, the slowest method of
transfer between fast memory and backing store.

7. COMMUNICATIONS:
With the development of distributed computer systems there is a wide spread
demand for communication between the devices and the computers. The
same can be illustrated as in figure.3.21.
At the plant level communications involve parallel analog and digital signal
transmission techniques since the distances over which communication is
required are small and high-speed communication is usually required.
At the higher levels serial communication methods are used. Since,
communication distances extend beyond a few hundred yards, the use of
parallel cabling rapidly becomes cumbersome and costly.
Analog systems are generally limited to short distances as they are prone to
noises, especially in an industrial environment.
The use of parallel digital transmission provides high data transfer rates but
is expensive in terms of cabling and interface circuitry and again is normally
only used over short distances or when very high rates of transfer are
required.

22

Ch-03
HARDWARE REQUIREMENTS

COMPUTER

Fig (3.21): Data transmission links


Serial communication can be characterized in the following manner:
i.
Mode
(a) Asynchronous
(b) Synchronous

ii.
Quantity
(a) Character by character
(b) Block
iii.

Distance
(a) Local
(b) Remote (wide area)

iv.

Code
(a) ASCII
(b) Other

1. Asynchronous and Synchronous transmission techniques:


Asynchronous communication
Asynchronous communication is transmission of data without the use of an
external clock signal. Any timing required to recover data from the
communication symbols is encoded within the symbols. The most significant
aspect of asynchronous communications is variable bit rate, or that the
transmitter and receiver clock generators do not have to be exactly
synchronized.
23

Ch-03
HARDWARE REQUIREMENTS

COMPUTER

An alternative approach is to use an additional physical connection - a clock


wire - and periodically to send a synchronizing signal called the stop-start
system.
In this system each character transmitted is preceded by a 'start' bit and
followed by one or two 'stop' bits as in Figure 3.22.
The start bit is used by the receiver to synchronize its clock with the incoming
data; for correct transfer of data the clock and data signals must remain
synchronized for the time taken to receive the following eight data bits and
two stop bits.
The transmission is thus bit synchronous but character asynchronous.
The advantage of the stop-start system is that, particularly at the lower
transmission rates, the frequencies of the clock signal generators do not have
to be closely matched.
The disadvantage is that for each character transmitted (seven bits) three
or four extra bits of information have also to be transmitted and thus the
overall information ratio is not very high.
To overcome the problem of transmitting redundant bits, large volumes of
data are transmitted over short periods of time.
The characters are grouped into records, and each record is preceded by a
synchronization signal and terminated with a stop sequence. The
synchronization sequence is used to enable the receiver to synchronize with
the transmitter clock. The same is illustrated in fig 3.23.
There are two main standards for synchronous transmission systems:
i.
BISYNC (Binary Synchronous Communication): old system used in IBM
equipment and is obsolescent.
ii.
HDLC (High-level Data Link Control). This is used in most new equipment.

Fig 3.22 Asynchronous transmission technique

Synchronous communication
In synchronous transmission systems the clock signal for the timing of the
data transfer is provided solely by the transmitter and is sent to the receiver
even when no data is being transmitted. When data is transmitted it is
superimposed on the clock signal.
There is no need to transmit extra bits to enable the receiver clock to
synchronize with the transmitter and hence the effective data transmission
rate for a given speed of line is higher.
The disadvantage is that the interface circuitry is more complex and hence
more expensive. The use of synchronous transmission does not avoid the
need for a transmission protocol.
The advantage of block transmission is that a much higher ratio of data bits
to control bits can be obtained.

24

Ch-03
HARDWARE REQUIREMENTS

COMPUTER

Fig 3.23 Synchronous transmission technique

2. Local- and Wide-area Networks:


Wide-area networks operate over a very wide geographical area at moderate
speeds.
The local area network (LAN) is used in the design of process control
equipment. LANs make use of a wide range of transmission media such as
twisted pair, co-axial cable, and fiber optics; they operate at a range of
transmission speeds and use a range of different protocols and topologies.
The typical topologies are as follows:
i.
Data bus: all devices are simply plugged into the transmitting medium (bus).
The bus is inherently reliable because of its passive nature but there may be
a limitation on the length of a bus in that any transmitting device connected
has to be able to transmit for the full length of the bus. It is a broadcast
system and hence a packet of data placed on the bus is available to all
devices. It is as shown in fig 3.24.

Fig (3.24): LAN Topology-Data Bus

ii.

Star: it has a central switching node to which all other nodes are connected
by a bidirectional link. Data sent to the central switch can be forwarded either
25

Ch-03
HARDWARE REQUIREMENTS

COMPUTER

to all other nodes, or only to a specified node. Drawback is that if the central
node fails then the network also fails. It is as shown in fig 3.25.

Fig (3.25): LAN Topology-Star

iii.

iv.

Hierarchy: The system is similar to star network, but instead of one central
switching node, many of the nodes act as switches. It is as shown in fig 3.26.

Fig (3.26): LAN Topology-Hierarchy


Ring: the ring contains regeneration circuits which amplify the signals. The
information placed on a ring network continues to circulate until a device
removes it from the ring; in some systems the originating device removes the
data from the ring. The information is broadcast in the sense that it is
available to all devices connected to the ring. It is as shown in fig 3.27.

26

Ch-03
HARDWARE REQUIREMENTS

v.

COMPUTER

Fig (3.27): LAN Topology-Ring


Mesh: The mesh topology allows for random interconnection between the
various nodes. It provides a means by which alternative routes between
nodes can be found It is as shown in fig 3.28.

Fig (3.28): LAN Topology-Mesh


The typical bus arbitration techniques used are:

i.
ii.

Synchronous token passing, message slots; and


Asynchronous carrier sense multiple access/collision detection
(CSMA/CD).

8. STANDARD INTERFACES:
There are many companies which cater to the needs of computers for real
time systems, and they develop individual standards for interface of devices
and computers.
The drawback is that the standards supported by particular manufacturers
are not compatible with each other; hence a change of computer
necessitates a redesign of the interface.
The first attempt to develop independent standard was made by the British
Standards Institution (BS 4421, 1969).

27

Ch-03
HARDWARE REQUIREMENTS

COMPUTER

Drawback of the system is that the standard is limited to the concept of how
the devices should interconnect and the standard does not define the
hardware.
A general purpose interface bus (GPIB) was developed by the Hewlett
Packard Company in the early 1970s for connecting laboratory instruments to
a computer. The system was adopted by the IEEE and standardized as the
IEEE 488 bus system.
The ISO (International Organisation for Standardisation) have developed a
standard protocol system in the Open Systems Interconnection (OS I)
model. This is a layered (hierarchical) model with seven layers running from
the basic physical connection to the highest application protocol. The general
structure is illustrated in Figure 3.29. The layers can be described as shown in
Table 3.1.

Fig (3.29): ISO-OSI model

28

Ch-03
HARDWARE REQUIREMENTS

COMPUTER

Table 3.1: ISO-OSI model

)==(=)==(=)==(=)==(=)==(=)==(=)==(=)==(=)==(=)==(
WATCH YOUR CHARACTER, FOR IT BECOMES YOUR DESTINY!!

29

Ch-03
HARDWARE REQUIREMENTS

COMPUTER

QUESTION BANK
1. Draw a schematic diagram of a general purpose computer and explain each
block in detail.
2. Draw a diagram representing a single chip microcomputer and compare the
same with general purpose computer.
3. What are reasons contributing for the development and usage of specialized
processors?
4. Explain in detail any 2 specialized processors.
5. With relevant block diagram compare (i)SISD (ii) MISD (iii) SIMD (iv) MIMD
6. Classify the devices that are interconnected on to a processor based on the
nature of the signal
7. With a block diagram and timing diagram explain the use of digital interface
as an input device.
8. With a block diagram and timing diagram explain the use of digital interface
as an output device.
9. With appropriate block diagrams explain the use of analog interface as input
and output devices.
10.Enumerate in detail the pulse interface to processor and types of pulses and
their interface.
11.What is real time clock and distinguish it from a general clock.
12.Write short notes on :
i)

Polling

ii)

Interrupts

iii)

Interrupt input mechanism

iv)

Interrupt response mechanism

v)

Hardware vectored interrupts.

vi)

Interrupt response vectors

vii)

Multi level interrupts

viii)

DMA
30

Ch-03
HARDWARE REQUIREMENTS

COMPUTER

13.Compare polling and interrupt mechanism


14.Explain in detail, various communication techniques used for real time
system with emphasis on serial communication.
15.Write short notes on LAN topologies and OSI model.
16.List and explain the basic features of CPU, which influence the selection of
computer.
17.Explain the various types of memories that are used in the computer.
18.Explain the different types of buses.
19.What is context switching? And how is it implemented?
20.Explain the various techniques for arbitration among priorities.
21.Explain the interrupt masking with relevant hardware block diagram and
software sequence.
22.What are the advantages of masking interrupts?
23.Explain the HDLC packet format.
24.What is the necessity of standardized interfaces? Explain the various
standardized interfaces.

31

Ch-03
HARDWARE REQUIREMENTS

COMPUTER

ASSIGNMENT
1. Why is memory protection important in real time systems? What methods
can be used to provide memory protection?
2. A large valve controlling the flow of steam is operated by a dc motor. The
motor controller has two inputs:
i.

On/off control. 5V and 0V respectively

ii.

Direction: 0V=clockwise and 5V=anti-clockwise;

And two outputs:


i.

Fully open=0V

ii.

Fully closed=5V.

Show how this valve could be interfaced to a computer controlling the process.
3. A turbine flow meter generates pulses proportional to the flow rate of a liquid.
What methods can be used to interface the device to a computer?
4. The clock on a computer generates an interrupt every 20msec. Draw a
flowchart for the ISR. The routine has to keep a 24hour clock in hours,
minutes and seconds.
5. 20 analog signals from a plant have to be processed (sampled and digitized)
every 1sec. the ADC and multiplexer which is available can operate in 2
modes: automatic scan and computer controlled scan. In the automatic scan
mode. On receipt of a start signal the converter cycles through each channel
in turn. The data corresponding to the channel sampled is available for
0.96ms. The signal not-ready is asserted during the conversion period and
this indicates that the data is changing and should not read be read by the
computer. The timing is as shown in fig 3.30. In mode2 under computer
controlled scanning, the convertor holds the data for each channel sampled
until it receives a command from the computer to start the sampling of next
channel. To speed up the operation the multiplexer is switched to the next
channel once the current channel has been sampled and before the computer
reads the data for the current channel. The convertor can be reset to start
from channel1 by asserting a signal reset. The timing of this mode of
operation is shown in fig 3.30. Consider the ways in which (a) polling (b)
interrupt methods can be used to interface the convertor to a computer.
Discuss in detail the advantages and disadvantages of each method.

32

Ch-03
HARDWARE REQUIREMENTS

COMPUTER

Fig 3.30: Timing diagram for problem 5

)==(=)==(=)==(=)==(=)==(=)==(=)==(=)==(=)==(=)==(

33