71
ME 1402 – MECHATRONICS (UNIT III) SYSTEM MODELS This chapter determines how the systems behave with time when subjected to some disturbance. E.g. A microprocessor switches on a motor. The speed will not attain immediately but it will take some time to attain full speed. In order to understand the behavior of the systems, mathematical models are needed. These models are equations which describe the relationship between the input and output of a system. The basis for any mathematical model is provided by the fundamental physical laws that govern the behavior of the system. In this chapter a range of systems will be considered including mechanical, electrical, thermal & fluid examples. Systems can be made up from a range of building blocks from a number of basic building blocks. MECHANICAL SYSTEM BUILDING BLOCKS The basic building blocks of the models used to represent mechanical systems are 1) Springs 2) dashpots 3) masses Springs Springs represents the stiffness of the system. The fig. shows a spring subjected to force F. 1

47860767 ME1402 Mechatronics Unit 3

  • Upload
    gf6197

  • View
    51

  • Download
    16

Embed Size (px)

Citation preview

Page 1: 47860767 ME1402 Mechatronics Unit 3

ME 1402 – MECHATRONICS (UNIT – III)

SYSTEM MODELS

This chapter determines how the systems behave with time when

subjected to some disturbance. E.g. A microprocessor switches on a

motor. The speed will not attain immediately but it will take some

time to attain full speed.

In order to understand the behavior of the systems,

mathematical models are needed. These models are equations

which describe the relationship between the input and output of a

system. The basis for any mathematical model is provided by the

fundamental physical laws that govern the behavior of the system. In

this chapter a range of systems will be considered including

mechanical, electrical, thermal & fluid examples.

Systems can be made up from a range of building blocks from a

number of basic building blocks.

MECHANICAL SYSTEM BUILDING BLOCKS

The basic building blocks of the models used to represent

mechanical systems are

1) Springs 2) dashpots 3) masses

Springs

Springs represents the stiffness of the system. The fig. shows a

spring subjected to force F.

1

Page 2: 47860767 ME1402 Mechatronics Unit 3

In case of spring the extension (or) compression is proportional to

the applied forces.

xKF .=

F – Applied force x – extension k – a constant

The spring when stretched stores energy, the energy being

released when the spring back to its original length. The energy

stored,

K

FxKE

2.

2

1 22 ==

Dash Pots

Dashpots building blocks represent the types of forces

experienced when we push the object through a fluid or move an

object against frictional forces.

In ideal case damping or resisting force F is proportional to the

velocity of the piston. Thus

F = C v

V – Velocity of piston C – a constant

dt

dxCF = (Since velocity is the rate of change of displacement x.)

Masses 2

Page 3: 47860767 ME1402 Mechatronics Unit 3

Masses represent the inertia or resistance to acceleration.

According to Newton’s II law F = ma

dt

dvm= = 2

2

dt

xdm

There is also energy stored in mass, when it is moving with

velocity V1. The energy being referred to as kinetic energy, and

released when it stops moving.

2

2

1mvE ×=

However there is no energy stored in the dashpot. It does not

return to the original position, when there is no force input. The

dashpot dissipates energy rather than spring. The power dissipated

depending on the velocity V and being given by.

P = C V2

ROTATIONAL SYSTEMS

The spring, dashpot and mass are the basic building blocks for

mechanical systems when forces and straight line displacements

are involved without any rotation.

If there is rotation then the equivalent three building blocks are a

torsional spring, a rotary damper and the moment of inertia, i.e,

3

Page 4: 47860767 ME1402 Mechatronics Unit 3

the inertia of a rotating mass. With such building blocks the inputs

are torque and the outputs angle rotated.

With a torsional spring the angle θ rotated is proportional to the

toque T. Hence

With the rotary damper a disc is rotated in a fluid and the resistive

toque T is proportional to the angular velocity ω, and since angular

velocity is the rate at which angle changes. i.e. dt

dθ.

The moment of inertia building block exhibits the property that

the greater the moment of inertia I the greater the torque needed

to produce an angular acceleration α.

Thus, since angular acceleration is the rate of change of angular

velocity, i.e.dt

dω, and angular velocity is the rate of change of

angular displacement, then

4

Page 5: 47860767 ME1402 Mechatronics Unit 3

The torsional spring and the rotating mass store energy; the rotary

damper just dissipates energy. The energy stored by a torsional

spring when twisted through an angle θ is ½ kθ2 and since T = k θ

this can be written as

The energy stored by a mass rotating with an angular velocity ω

is the kinetic energy E, where

The power P dissipated by the rotary damper when rotating with an

angular velocity ω is

5

Page 6: 47860767 ME1402 Mechatronics Unit 3

BUILDING UP A MECHANICAL SYSTEM

TRANSLATIONAL MECHANICAL SYSTEM

Spring mass damper system:

A spring mass damper system is shown in fig. The system is fixed

at one end and the mass is supported by a spring and damper. The

mass is excited by force and free to oscillate. The equation of motion

related to horizontal motion x of mass to applied force can be

developed with of a free body diagram

Net force applied to mass

vBxkFm .. −−=

6

Page 7: 47860767 ME1402 Mechatronics Unit 3

dt

dxBkxF −−=

------- (1)

Also net force applied to mass = mass x acceleration = 2

2

dt

xdm -----

(2)

Equation (1) = (2) Apply Newton’s II law of motion

2

2

dt

xdm

dt

dxBkxF −−=

dt

dxBkx

dt

xdmF ++=

2

2

This equation is called as the differential equation that describes

the relation between input and output.

ILLUSTRATIONS

MATHEMATICAL MODEL FOR A MACHINE MOUNTED ON THE

GROUND

MATHEMATICAL MODEL OF A WHEEL OF A CAR MOVING

ALONG A ROAD

7

Page 8: 47860767 ME1402 Mechatronics Unit 3

PROBLEMS

8

Page 9: 47860767 ME1402 Mechatronics Unit 3

9

Page 10: 47860767 ME1402 Mechatronics Unit 3

ELECTRICAL SYSTEM BUILDING BLOCKS

The basic building blocks of electrical building blocks are

inductors, capacitors, and resisters.

Resistors:

Resistance is an opposition to movement of flow of material or

energy. An electric resistor opposes the flow of current, the voltage

V across the resistor is given by V= I R,

Where R= resistance.

Capacitors

Capacitors are used to stored charge to increase the voltage by

iV. A capacitor consists of two parallel plates separated by insulating

material and capacitor act as a strong device of energy. The voltage

equation for a capacitor is

idtC

V ∫= 1Where c = capacitor.

Inductors:

It consists of a coil wire. When current flows through the

wire, a magnetic field surrounding the wire is produced. Any attempt

to change the density of this magnetic field leads to the induction of

voltage. The inductor equation is

dt

diLV =

10

Page 11: 47860767 ME1402 Mechatronics Unit 3

Kirchhoff’s law:

Electrical networks can be analyzed using Kirchhoff’s current and

voltage laws.

1. The current law states that the sum of the current flowing into a

junction equals to the sum of the current flowing out of a

junction.

2. The voltage law state that the sum of the voltage input equal

the sum of the voltage drop in any closed loop.

BUILDING UP A MODEL FOR ELECTRICAL SYSTEM

NODE ANALYSIS

11

Page 12: 47860767 ME1402 Mechatronics Unit 3

MESH ANALYSIS

12

Page 13: 47860767 ME1402 Mechatronics Unit 3

RESISTOR CAPACITOR SYSTEM (RC SYSTEM)

13

Page 14: 47860767 ME1402 Mechatronics Unit 3

RESISTOR INDUCTOR SYSTEM (RL SYSTEM)

14

Page 15: 47860767 ME1402 Mechatronics Unit 3

RESISTOR INDUCTOR CAPACITOR SYSTEM (RLC SYSTEM)

15

Page 16: 47860767 ME1402 Mechatronics Unit 3

ANOTHER ILLUSTRATION FOR RLC SYSTEM

16

Page 17: 47860767 ME1402 Mechatronics Unit 3

FLUID SYSTEM BUILDING BLOCKS

The three basic building blocks of a fluid flow system can be

considered to be equivalent of electrical resistance, inductance and

capacitance. Fluid systems can be considered to fall in to two

categories.

1. Hydraulic. 2. Pneumatic

In hydraulic the fluid is a liquid and considered to be

incompressible. In pneumatic gas is used and which can be

compressed.

HYDRAULIC SYSTEMS

1. Hydraulic resistance(R)

It is the resistance to flow which occurs as a result of a liquid

flowing through valves or changes in pipe diameter. The relationship

between the volume flow rate and resistance element and the

resulting pressure difference

qRPP .21 =− Where R = hydraulic resistance.

17

Page 18: 47860767 ME1402 Mechatronics Unit 3

2. Hydraulic capacitance

This term is used to describe energy storage with a liquid when it

is stored in the form of potential energy.

h = height of liquid.

q1,q2 = rate of liquid flow.

P = pressure difference

.

Then dt

dvqq =− 21 where

dt

dv= rate of change of volume V in

container.

( )

.tan,

21

21

ceapacihydrauliccg

AwhereC

dt

dPC

dt

dP

g

Adt

g

Pd

Aqq

g

PH

gHPdt

dHA

dt

AHdqq

ρ

ρ

ρ

ρ

ρ

=

=

=

=−∴

=

=

==−

18

Page 19: 47860767 ME1402 Mechatronics Unit 3

3. Hydraulic inertance

It is equivalent of inductance in electrical systems or a spring in

mechanical systems. To accelerate a fluid and so increase its

velocity a force is required. Consider a block of liquid of mass m.

The net force acting on the liquid,

2121 PAPFF −=−

( ) APP 21 −=

This net force cause the mass to accelerate with an acceleration a,

therefore

( ) amAPP .21 =−

dt

dvm=

dt

dvALρ=

Volume flow rate q= A.v

( )dt

dQLAPP 1

21 ρ=−∴

dt

dQ

A

LPP 1

21

ρ=−

dt

dQI 1=

Where I= hydraulic inertance.

19

Page 20: 47860767 ME1402 Mechatronics Unit 3

PNEUMATIC SYSTEM

20

Page 21: 47860767 ME1402 Mechatronics Unit 3

21

Page 22: 47860767 ME1402 Mechatronics Unit 3

22

Page 23: 47860767 ME1402 Mechatronics Unit 3

Building up a model for fluid system

23

Page 24: 47860767 ME1402 Mechatronics Unit 3

Derive the relationship between the height of liquids in the two

containers with time.

Capacitor for the container 1

dt

dpcqq 121 =−

ghpg

Ac ρ

ρ 111

1 & ==

( )dt

ghd

g

Aqq

ρρ

1121 ×=−∴

dt

dhg

g

A 11 .ρρ

×=

dt

dhA 1

1.= ----------- (1)

The q2= rate at which the liquid leaves the container that

equals the rate at which it leaves the valveR1

2121 .qRpp =−∴

2121 ... qRghgh =− ρρ

( ) 2121 .qRghh =− ρ

24

Page 25: 47860767 ME1402 Mechatronics Unit 3

( )2

1

21 qgR

hh=

− ρ------------------- (2)

Sub (2) in (1)( )

dt

dhAg

R

hhq 1

11

211 .=

−− ρ -----------(3)

The above equations describe how the height of liquid in

container 1 depends on the input rate of flow.

Capacitor for container 2

dt

dpcqq .232 =−

dt

dhA 2

2 .= ---------------- (4)

The rate at which liquid leaves the container q3 equals to the rate

at which it leaves the valve R2

For resistor 3232 .qRpp =− p3 = 0

322 .qRp =∴

2

2

R

gh ρ= ---------- (5)

Sub (5) in (4) dt

dhA

R

ghq 2

22

22 =−

ρ------------------ (6)

Sub (2) in (6)

( )dt

dhA

R

gh

R

ghh 22

2

2

1

21 .=−

− ρρ

The above equations describe how the height of liquid in container 2

change with time.

Fig.

25

Page 26: 47860767 ME1402 Mechatronics Unit 3

26

Page 27: 47860767 ME1402 Mechatronics Unit 3

27

Page 28: 47860767 ME1402 Mechatronics Unit 3

THERMAL SYSTEM BUILDING BLOCKS

For thermal system, there are only two building blocks.

1. Thermal Resistance.2. Thermal Capacitance.

Thermal resistance

If Q is the rate of heat flow and (T2-T1) is the temperature

difference, then

Qth = ( )

thR

TT 12 −

The value of Rth depends on mode of heat transfer. In case of

conduction through solid

( )L

TTKAQ 12 −

= For this KA

LRth =

When mode of heat transfer is convection.

( )12 TTAhQ −= For this mode

AhRth

1=

Thermal capacitance28

Page 29: 47860767 ME1402 Mechatronics Unit 3

It is a measure of the store of energy in a system.

dt

dTcmQQ ×=− 21

dt

dTCQQ h ×=− 21

Q1= rate of flow of heat into the system.

Q2= rate of flow of heat out from the system

M= mass C= specific heat. Ch= thermal capacitance

=dt

dTRate of change of temperature.

BUILDING UP A MODEL FOR THERMAL SYSTEM

29

Page 30: 47860767 ME1402 Mechatronics Unit 3

30

Page 31: 47860767 ME1402 Mechatronics Unit 3

31

Page 32: 47860767 ME1402 Mechatronics Unit 3

`

32

Page 33: 47860767 ME1402 Mechatronics Unit 3

ADDITIONAL PROBLEMS

33

Page 34: 47860767 ME1402 Mechatronics Unit 3

34

Page 35: 47860767 ME1402 Mechatronics Unit 3

ROTATIONAL – TRANSLATIONAL SYSTEMS

35

Page 36: 47860767 ME1402 Mechatronics Unit 3

ELECTRO- MECHANICAL SYSTEMS

POTENTIOMETER

36

Page 37: 47860767 ME1402 Mechatronics Unit 3

HYDRAULIC – MECHANICAL SYSTEMS

37

Page 38: 47860767 ME1402 Mechatronics Unit 3

38

Page 39: 47860767 ME1402 Mechatronics Unit 3

39

Page 40: 47860767 ME1402 Mechatronics Unit 3

40

Page 41: 47860767 ME1402 Mechatronics Unit 3

41

Page 42: 47860767 ME1402 Mechatronics Unit 3

42

Page 43: 47860767 ME1402 Mechatronics Unit 3

CONTROLLERS

Open-loop control is essentially just a switch on-switch off form

of control, e.g. an electric fire is either switched on or off in order to

heat a room. With closed-loop control systems, a controller is used

to compare the output of a system with the required condition and

convert the error into a control action designed to reduce the error.

In this chapter we are concerned with the ways in which controllers

can react to error signals, i.e. the control modes as they are termed,

which occur with continuous processes.

Control modes:

43

Page 44: 47860767 ME1402 Mechatronics Unit 3

TWO – STEP MODE

44

Page 45: 47860767 ME1402 Mechatronics Unit 3

Oscillations with two step mode Two step control with two

controller switch points

45

Page 46: 47860767 ME1402 Mechatronics Unit 3

PROPORTIONAL MODE (P)

46

Page 47: 47860767 ME1402 Mechatronics Unit 3

47

Page 48: 47860767 ME1402 Mechatronics Unit 3

DERIVATIVE CONTROL (D)

48

Page 49: 47860767 ME1402 Mechatronics Unit 3

PROPORTIONAL PLUS DERIVATIVE CONTROL (PD)

49

Page 50: 47860767 ME1402 Mechatronics Unit 3

INTEGRAL CONTROL (I)

50

Page 51: 47860767 ME1402 Mechatronics Unit 3

51

Page 52: 47860767 ME1402 Mechatronics Unit 3

PROPORTIONAL PLUS INTEGRAL CONTROL (PD)

52

Page 53: 47860767 ME1402 Mechatronics Unit 3

PID CONTROLLERS

53

Page 54: 47860767 ME1402 Mechatronics Unit 3

DIGITAL CONTROLLERS

The digital controller requiring inputs which are digital, process

the information in digital form and give an output in digital form. The

controller performs the following functions:

1) Receives input from sensors.

2) Executes control programs

3) Provides the output to the correction elements.

As several control systems have analog measurements an analog

– to digital converters (ADC) is used for the inputs. The fig shows the

digital closed – loop control system which can be used with a

continuous process.

The clock supplies a pulse at regular time intervals, and dictates

when samples of controlled variables are taken by ADC.

These samples are then converted into digital signals which are

compared by the microprocessor with the set point value to give the

error signal. The error signal is processed by a control mode and

digital output is produced.

54

Page 55: 47860767 ME1402 Mechatronics Unit 3

The digital output, generally offer processing by an DAC since

correction elements generally require analog signals, can be used to

initiate the corrective action.

Sequence of operation

1) Samples the measured value.

2) Compares this measured value with the set value and stored

values of previous inputs and outputs to obtain the output

signal.

3) Send the output signal to DAC

4) Waits until the next samples time before repeating the cycle.

VELOCITY CONTROL

A second order system with proportional control system will take

more time to reach the required output when step input is given.

Consider the problem of controlling the movement of a load by

means of a motor. This is an example to control velocity, because

the motor system is likely to be second order, proportional control

will lead to the system output taking time to reach the required

displacement when step input is given. Such a system is shown in

the fig.

55

Page 56: 47860767 ME1402 Mechatronics Unit 3

A higher speed response, with fewer oscillations, can be

obtained by using the PD control. An alternative of achieving the

same effect and this is by the use of a second feedback loop that

gives a measurement related to the rate at which the displacement is

changing. This is termed as velocity feed back.

The velocity feed back might involve the use of a tacho-generator

giving a signal proportional to the rotational speed of the motor shaft

and hence the rate at which the displacement is changing and the

displacement might be monitoring using a rotary potentiometer.

ADAPTIVE CONTROL

The adaptive controllers change the controller parameter to adapt

to the changes and fit the prevailing circumstances. Often the control

parameters of the process changes with time (or) load. This will alter

the transfer functions of the system. Therefore returning of the

system is desirable, for the controllers. OR

For a control system it has been assumed that the system once

tuned retains its value of proportional, derivative, and integral

constant until the operator decides to retune. The alternative to this

is an adaptive control system which adapts to changes and changes

its parameters to fit the circumstances prevailing.

The adaptive control system can be considered to have three

stages of operation,

1) Starts to operate with controller conditions set on the basis of an

assumed condition.

2) The designed performance in continuously compared with the

actual system performance.56

Page 57: 47860767 ME1402 Mechatronics Unit 3

3) The control system mode and parameters are automatically and

continuously adjusted in order to minimize the difference between

the desired and actual system performance.

Adaptive control system can take a number of forms. The three

commonly used forms are:

1. Gain scheduling control

2. Self – tuning control

3. Model – reference adaptive control.

Gain scheduling control

With gain scheduling control, present changes in the parameter of

the controller are made on the basis of some auxiliary measurement

of some process variable. The term gain – scheduled control was

used because the only parameter originally adjusted was to gain is

kp

Self tuning

57

Page 58: 47860767 ME1402 Mechatronics Unit 3

With self tuning control system continuously tunes its own

parameter based on monitoring the variable that the system is

controlling.

Self- tuning is found in PID controllers. It is generally refers to

auto- tuning. When the operator presses a button, the controller

injects a small disturbance into the system and measures the

response. This response is compared to the desired response and

the control parameters are adjusted.

Model – reference control

Model reference system is an accurate model of the system

is developed. The set value is then used as input to both model

systems and actual systems and the difference between the actual

output and output from the model compared. The difference in these

signals is then used to adjust the parameters of the controller to

minimize the difference.

58

Page 59: 47860767 ME1402 Mechatronics Unit 3

MICROPROCESSOR’S CONTROL

A microprocessor is a programmable digital electronic component

that incorporates the functions of a central processing unit (CPU) on

a single semi conducting integrated circuit (IC). The microprocessor

was born by reducing the word size of the CPU from 32 bits to 4 bits,

so that the transistors of its logic circuits would fit onto a single part.

One or more microprocessor typically serves as the CPU in a

computer system, embedded system, or hand held device.

Microprocessors made possible the advent of the

microcomputer in the mid- 1970s.Before this period, electronic CPUs

were typically made from bulky discrete switching devices (and later

small-scale integrated circuits) containing the equivalent of only a

few transistors. By integrating the processor onto one or a very few

large-scale integrated circuit packages (containing the equivalent of

thousands or millions of discrete transistors), the cost of processor

power was greatly reduced. Since the advent of the IC in the mid-

1970s, the microprocessor has become the most prevalent

implementation of the CPU, nearly completely replacing all other

forms.

Definition

The microprocessor is a program controlled semiconductor

device (IC), which fetches (from memory), decodes and executes

instructions. It is used as CPU (Central Processing Unit) in

computers.

Microprocessors are now rapidly replacing the mechanical

cam operated controllers and being used in general to carry out 59

Page 60: 47860767 ME1402 Mechatronics Unit 3

control functions. They have the great advantage that a greater

variety of programs became feasible.

60

Page 61: 47860767 ME1402 Mechatronics Unit 3

REGISTERS

61

Page 62: 47860767 ME1402 Mechatronics Unit 3

1. General purpose registers

registers but access is not required, it is an internal operation.

Thus it provides an efficient way to store intermediate results and

use them when required. The efficient programmer prefers to use

these registers to store intermediate results than the memory

locations which require but access and hence more time to

perform the operation.

2. Temporary Registers

a) Temporary Data Register

62

Page 63: 47860767 ME1402 Mechatronics Unit 3

The ALU has two inputs. One input is supplied by the

accumulator and other from temporary data register. The

programmer cannot access this temporary data register.

However, it is internally used for execution of most of the

arithmetic and logical instructions. For example, ADD B is the

instruction in the arithmetic group of instructions which adds the

contents of register A and register B and stores result in register

A. The addition operation is performed by ALU. The ALU takes

inputs from register A and temporary data register. The contents

of register B are transferred to temporary data register for

applying second input to the ALU.

b) 'W and Z Registers

W and Z registers are temporary registers. These registers

are used to hold 8-bit data during execution pf some instructions.

These registers are not available for programmer, since 8085

uses them internally.

Use of W and Z Registers

The CALL instruction is used to transfer program control to

a subprogram or subroutine. This instruction pushes the current

PC contents onto the stack and loads the given address into the

PC. The given address is temporarily stored in the W and Z

registers and placed on the bus for the fetch cycle. Thus the

program control is transferred to the address given in the

instruction. XCHG instruction exchanges the contents of H with D

and L with E. At the time of exchange W and Z registers are used

for temporary storage of data.63

Page 64: 47860767 ME1402 Mechatronics Unit 3

3. Special Purpose Registers

a) Register A (Accumulator)

It is a tri-state eight bit register. It is extensively used in

arithmetic, logic, load, and store operations, as well as in,

input/output (1/0) operations. Most of the times the result of

arithmetic and logical operations is stored in the register A. Hence

it is also identified as accumulator.

b) Flag Register

It is an 8-bit register, in which five of the bits carry significant

information in the form of flags: S (sign flag), Z (zero flag), AC

(auxiliary carry flag), P (parity flag) and CY (carry flag), as shown

in figure.

S-sign flag

After the execution of arithmetic or logical operations, if bit

D, of the result is 1, the Sign flag is set. In a given byte if D, is 1,

the number will be viewed as negative number. If D is 0, the

number will be considered as positive number.

The zero flag sets if the result of operation in ALU is zero and flag

resets if result is non zero. The zero flag is also set if a certain

register content becomes zero following an increment or

decrement operation of that register.

64

Page 65: 47860767 ME1402 Mechatronics Unit 3

AC-Auxiliary Carry Jag

This flag is set if there is an overflow out of bit 3, i.e., carry

from lower nibble to higher nibble (D, bit to D, bit). This flag is

used for BCD operations and it is not available for the

programmer.

P-Parity Flag

Parity is defined by the number of ones present in the

accumulator. After an arithmetic or logical operation if the result

has an even number of ones, i.e. even parity, the flag is set. If the

parity is odd, flag is reset.

CY-carry flag

This flag is set if there is an overflow out of bit 7. The carry

flag also serves as a borrow flag for subtraction. In both the

examples show below, the carry flag is set.

c) Instruction Register

In a typical processor operation, the processor first fetches

the opcode of instruction from memory (i.e. it places an address

on the address bus and memory responds by placing the data

stored at the specified address on the data bus).

65

Page 66: 47860767 ME1402 Mechatronics Unit 3

The CPU stores this opcode in a register called the

instruction register. This opcode is further sent to the instruction

decoder to select one of-the 256 alternatives.

4. Sixteen Bit Registers

a) Program Counter (PC)

Program is a sequence of instructions. As mentioned

earlier, microprocessor fetches these instructions from the

memory and executes them sequentially. The program counter is

a special purpose register which, at a given time, stores the

address of the next instruction to be fetched. Program counter

acts as a pointer to the next instruction.

How processor increments program counter depends on the

nature of the instruction; for one byte instruction it increments

program counter by one, for two byte instruction it increments

program counter by two and for three byte instruction it

increments program counter by three such that program counter

always points to the address of the next instruction.

In case of JUMP and CALL instructions, address followed by

JUMP and CALL instructions is placed in the program counter.

The processor then fetches the next instruction from the new

address specified by JUMP or CALL instruction. In conditional

JUMP and conditional CALL instructions, if the condition is not

satisfied, the processor increments program counter by three so

that it points the instruction followed by conditional JUMP or CALL

instruction; otherwise processor fetches the next instruction from

the new address specified by JUMP or CALL instruction.66

Page 67: 47860767 ME1402 Mechatronics Unit 3

b) Stack Pointer (SP)

The stack is a reserved area of the memory in the RAM

where temporary information may be stored. A 16-bit stack

pointer is used to hold the address of the most recent stack entry.

ARITHMETIC LOGIC UNIT (ALU)

The 8085'sALU performs arithmetic and logical functions on

eight bit variables. The arithmetic unit bitwise fundamental

arithmetic operations such as addition

and subtraction. The logic unit performs logical operations such

as complement, AND, OR and EX-OR, as well as rotate and

clear. The ALU also looks after the branching decisions.

Instruction Decoder

As mentioned earlier, the processor first fetches the opcode

of instruction from memory and stores this opcode in the

instruction register. It is then sent to the instruction decoder. The

instruction decoder decodes it and accordingly gives the timing

and control signals which control the register, the data buffers,

ALU and external peripheral signals (explained in later sections)

depending on the nature of the instruction.

The 8085 executes seven different types of machine cycles.

It gives the information about which machine cycle is currently

67

Page 68: 47860767 ME1402 Mechatronics Unit 3

executing in the encoded form on the So, S, and 10 IM lines. This

task is done by machine cycle encoder.

Address Buffer

This is a 8-bit unidirectional buffer. It is used to drive

external high order address bus (A15, -A8,). It is also used to tri-

state the high order address bus under certain conditions such as

reset, hold, and halt and when address lines are not in use.

Address/Data Buffer

This is an 8-bit bi-directional buffer. It is used to drive

multiplexed address/data bus, i.e., low order address bus (A7,

-A0,) and data bus (D7, - Do). It is also used to tristate the

multiplexed address/data bus under certain conditions such as

reset, hold, and halt and when the bus is not in use.

The address and data buffers are used to drive external address

and data buses respectively. Due to these buffers the address

and data buses can be tri-stated when they are not in use.

Incrementer/Decrementer Address Latch

This 16-bit register is used to increment or decrement

the contents of program counter or stack pointer as a part of

execution of instructions related to them.

Interrupt Control

The processor fetches, decodes and executes instructions

in a sequence. Sometimes it is necessary to have processor the

automatically execute one of a collection of special routines 68

Page 69: 47860767 ME1402 Mechatronics Unit 3

whenever special condition exists within a program or the

microcomputer system. The most important thing is that, after

execution of the special routine, the program control must be

transferred to the program which processor was executing before

the occurrence of the special condition. The occurrence of this

special condition is referred as interrupt. The interrupt control

block has five interrupt inputs RST 5.5, RST 6.5, RST 7.5, TRAP

and INTR and one acknowledge signal INTA.

Serial I/0 Control

In situations like, data transmission over long distance and

communication with cassette tapes or a CRT terminal, it is

necessary to transmit data bit by bit to reduce the cost of cabling.

In serial communication one bit is transferred at a time over a

signal line. The 8085's serial I/0 controls provide two lines, SOD

and SID for serial communication. The serial output data (SOD)

line is used.

Timing and Control Circuitry

The control circuitry in processor 8085 is responsible for all

the operations. The control circuitry and hence the operations in

8085 are synchronized with the help of clock signal. Along with

the control of fetching and decoding operations and generating

appropriate signals for instruction execution, control circuitry also

generates signals required to interface external devices to the

processor, 8085.

Pin Configuration of 8085

69

Page 70: 47860767 ME1402 Mechatronics Unit 3

Figure shows 8085 pin configuration and functional pin

diagram of 8085 respectively. The signals of 8085 can be

classified into seven groups according to their functions.

a) Power supply and frequency signals.

b) Data bus and address bus

c) Control bus.

d) Interrupt signals.

e) Serial L/O signals

f) DMA signals.

g) Reset signals.

70

Page 71: 47860767 ME1402 Mechatronics Unit 3

71