Mechatronics Unit 3

Embed Size (px)

Citation preview

  • 7/30/2019 Mechatronics Unit 3

    1/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 asystem. 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

  • 7/30/2019 Mechatronics Unit 3

    2/71

    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

    12

    2==

    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

  • 7/30/2019 Mechatronics Unit 3

    3/71

    Masses represent the inertia or resistance to acceleration.

    According to Newtons 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 SYSTEMSThe 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

  • 7/30/2019 Mechatronics Unit 3

    4/71

    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

  • 7/30/2019 Mechatronics Unit 3

    5/71

    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 k2 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

  • 7/30/2019 Mechatronics Unit 3

    6/71

    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

  • 7/30/2019 Mechatronics Unit 3

    7/71

    dt

    dxBkxF =

    ------- (1)

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

    2

    dt

    xdm -----

    (2)

    Equation (1) = (2) Apply Newtons 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 THEGROUND

    MATHEMATICAL MODEL OF A WHEEL OF A CAR MOVING

    ALONG A ROAD

    7

  • 7/30/2019 Mechatronics Unit 3

    8/71

    PROBLEMS

    8

  • 7/30/2019 Mechatronics Unit 3

    9/71

    9

  • 7/30/2019 Mechatronics Unit 3

    10/71

    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 =1

    Where c = capacitor.

    Inductors:

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

    wire, a magnetic field surrounding the wire is produced. Any attemptto change the density of this magnetic field leads to the induction of

    voltage. The inductor equation is

    dt

    diLV =

    10

  • 7/30/2019 Mechatronics Unit 3

    11/71

    Kirchhoffs law:

    Electrical networks can be analyzed using Kirchhoffs 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

  • 7/30/2019 Mechatronics Unit 3

    12/71

    MESH ANALYSIS

    12

  • 7/30/2019 Mechatronics Unit 3

    13/71

    RESISTOR CAPACITOR SYSTEM (RC SYSTEM)

    13

  • 7/30/2019 Mechatronics Unit 3

    14/71

  • 7/30/2019 Mechatronics Unit 3

    15/71

    RESISTOR INDUCTOR CAPACITOR SYSTEM (RLC SYSTEM)

    15

  • 7/30/2019 Mechatronics Unit 3

    16/71

    ANOTHER ILLUSTRATION FOR RLC SYSTEM

    16

  • 7/30/2019 Mechatronics Unit 3

    17/71

    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

  • 7/30/2019 Mechatronics Unit 3

    18/71

    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

    .

    Thendt

    dvqq =21 where

    dt

    dv= rate of change of volume V in

    container.

    ( )

    .tan,

    21

    21

    ceapacihydrauliccg

    AwhereC

    dt

    dPC

    dt

    dP

    g

    A

    dt

    g

    Pd

    Aqq

    g

    PH

    gHP

    dtdHA

    dtAHdqq

    =

    =

    =

    =

    =

    =

    ==

    18

  • 7/30/2019 Mechatronics Unit 3

    19/71

    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,

    2121PAPFF =

    ( )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 121 =

    dt

    dQ

    A

    LPP 1

    21

    =

    dt

    dQI 1=

    Where I= hydraulic inertance.

    19

  • 7/30/2019 Mechatronics Unit 3

    20/71

    PNEUMATIC SYSTEM

    20

  • 7/30/2019 Mechatronics Unit 3

    21/71

    21

  • 7/30/2019 Mechatronics Unit 3

    22/71

    22

  • 7/30/2019 Mechatronics Unit 3

    23/71

    Building up a model for fluid system

    23

  • 7/30/2019 Mechatronics Unit 3

    24/71

    Derive the relationship between the height of liquids in the two

    containers with time.

    Capacitor for the container 1

    dt

    dpcqq121

    =

    ghp

    g

    Ac

    11

    1

    1& ==

    ( )

    dt

    ghd

    g

    Aqq

    11

    21=

    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

  • 7/30/2019 Mechatronics Unit 3

    25/71

    ( )2

    1

    21 qgR

    hh=

    ------------------- (2)

    Sub (2) in (1)( )

    dt

    dhAg

    R

    hhq 1

    1

    1

    21

    1.=

    -----------(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 22 .= ---------------- (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

    2

    2

    2

    2=

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

    Sub (2) in (6)

    ( )

    dt

    dh

    AR

    gh

    R

    ghh2

    2

    2

    2

    1

    21.

    =

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

    change with time.

    Fig.

    25

  • 7/30/2019 Mechatronics Unit 3

    26/71

    26

  • 7/30/2019 Mechatronics Unit 3

    27/71

    27

  • 7/30/2019 Mechatronics Unit 3

    28/71

    THERMAL SYSTEM BUILDING BLOCKS

    For thermalsystem, 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

    TT12

    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.

    ( )12TTAhQ =

    For this modeAh

    Rth1

    =

    Thermal capacitance28

  • 7/30/2019 Mechatronics Unit 3

    29/71

    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

  • 7/30/2019 Mechatronics Unit 3

    30/71

    30

  • 7/30/2019 Mechatronics Unit 3

    31/71

    31

  • 7/30/2019 Mechatronics Unit 3

    32/71

    `

    32

  • 7/30/2019 Mechatronics Unit 3

    33/71

    ADDITIONAL PROBLEMS

    33

  • 7/30/2019 Mechatronics Unit 3

    34/71

    34

  • 7/30/2019 Mechatronics Unit 3

    35/71

    ROTATIONAL TRANSLATIONAL SYSTEMS

    35

  • 7/30/2019 Mechatronics Unit 3

    36/71

    ELECTRO- MECHANICAL SYSTEMS

    POTENTIOMETER

    36

  • 7/30/2019 Mechatronics Unit 3

    37/71

    HYDRAULIC MECHANICAL SYSTEMS

    37

  • 7/30/2019 Mechatronics Unit 3

    38/71

    38

  • 7/30/2019 Mechatronics Unit 3

    39/71

    39

  • 7/30/2019 Mechatronics Unit 3

    40/71

    40

  • 7/30/2019 Mechatronics Unit 3

    41/71

    41

  • 7/30/2019 Mechatronics Unit 3

    42/71

    42

  • 7/30/2019 Mechatronics Unit 3

    43/71

    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 modesas they are termed,

    which occur with continuous processes.

    Control modes:

    43

  • 7/30/2019 Mechatronics Unit 3

    44/71

    TWO STEP MODE

    44

  • 7/30/2019 Mechatronics Unit 3

    45/71

    Oscillations with two step mode Two step control with twocontroller switch points

    45

  • 7/30/2019 Mechatronics Unit 3

    46/71

    PROPORTIONAL MODE (P)

    46

  • 7/30/2019 Mechatronics Unit 3

    47/71

    47

  • 7/30/2019 Mechatronics Unit 3

    48/71

    DERIVATIVE CONTROL (D)

    48

  • 7/30/2019 Mechatronics Unit 3

    49/71

    PROPORTIONAL PLUSDERIVATIVE CONTROL (PD)

    49

  • 7/30/2019 Mechatronics Unit 3

    50/71

    INTEGRAL CONTROL (I)

    50

  • 7/30/2019 Mechatronics Unit 3

    51/71

    51

  • 7/30/2019 Mechatronics Unit 3

    52/71

    PROPORTIONAL PLUSINTEGRAL CONTROL (PD)

    52

  • 7/30/2019 Mechatronics Unit 3

    53/71

    PID CONTROLLERS

    53

  • 7/30/2019 Mechatronics Unit 3

    54/71

    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

  • 7/30/2019 Mechatronics Unit 3

    55/71

    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

  • 7/30/2019 Mechatronics Unit 3

    56/71

    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

  • 7/30/2019 Mechatronics Unit 3

    57/71

    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

  • 7/30/2019 Mechatronics Unit 3

    58/71

    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

  • 7/30/2019 Mechatronics Unit 3

    59/71

    MICROPROCESSORS 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 out59

  • 7/30/2019 Mechatronics Unit 3

    60/71

    control functions. They have the great advantage that a greater

    variety of programs became feasible.

    60

  • 7/30/2019 Mechatronics Unit 3

    61/71

    REGISTERS

    61

  • 7/30/2019 Mechatronics Unit 3

    62/71

    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

  • 7/30/2019 Mechatronics Unit 3

    63/71

    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

  • 7/30/2019 Mechatronics Unit 3

    64/71

    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 carrysignificant

    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

  • 7/30/2019 Mechatronics Unit 3

    65/71

    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

  • 7/30/2019 Mechatronics Unit 3

    66/71

    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

  • 7/30/2019 Mechatronics Unit 3

    67/71

    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

  • 7/30/2019 Mechatronics Unit 3

    68/71

    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 routines68

  • 7/30/2019 Mechatronics Unit 3

    69/71

    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

  • 7/30/2019 Mechatronics Unit 3

    70/71

    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

  • 7/30/2019 Mechatronics Unit 3

    71/71