9 intelligent instruments

Upload: ali-ahmad

Post on 02-Apr-2018

216 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/27/2019 9 Intelligent Instruments

    1/45

    Electronic InstrumentationLecturer Touseef Yaqoob 1

    Intelligent InstrumentsAn intelligent Instrument comprise all

    the usual elements of a measurement

    system and is only distinguished fromdumb (non-intelligent instrument)measurement system by the inclusion

    of a microprocessor to fulfill the signalprocessing task.

  • 7/27/2019 9 Intelligent Instruments

    2/45

    Electronic InstrumentationLecturer Touseef Yaqoob 2

    Processing with a microprocessorA microprocessor can readily perform

    correction of the instrument output for

    biased caused by environmentalvariations (e.g. Temperature changes)

    Microprocessor can do conversion to

    produce a linear output from atransducer whose characteristic isfundamentally non-linear.

  • 7/27/2019 9 Intelligent Instruments

    3/45

    Electronic InstrumentationLecturer Touseef Yaqoob 3

    The advent of the microprocessor has had anequally significant impact on the field of

    instrumentation. It is therefore necessary todescribes the principles of operation ofmicroprocessors and explaining how they areincluded and programmed as a

    microcomputer within a measuringinstrument, Thereby what has come to beknown as an intelligent instrument.

  • 7/27/2019 9 Intelligent Instruments

    4/45

    Electronic InstrumentationLecturer Touseef Yaqoob 4

    Microprocessor and MicrocomputerThe key element of a microcomputer is the LSImicroprocessor chip, whose circuitry can

    acquire, interpret, and execute a sequence oflogical and arithmetic instructions. Althoughmost computer programming is done in a highlevel language, the processor itself deals onlywith binary numbers that represent operation

    codes (move data, add, subtract, compare,jump, etc.) and addresses (routing informationfor the data flow) of registers, memorylocations or input/output data ports

  • 7/27/2019 9 Intelligent Instruments

    5/45

    Electronic InstrumentationLecturer Touseef Yaqoob 5

    Beside the microprocessor, a completecomputer requires a power supply,

    memory, interface circuits to provideportsto external devices, andinput/output devices such as a

    keyboard, display, DACs and ADCs, andmagnetic or other (optical) datastorage.

  • 7/27/2019 9 Intelligent Instruments

    6/45

    Electronic InstrumentationLecturer Touseef Yaqoob 6

    Functional Elements of the Computer

    The functional elements of a computer

    are the

    central processing unit (CPU),

    random access storage (memory), and input/output to external devices (I/O).

  • 7/27/2019 9 Intelligent Instruments

    7/45

    Electronic InstrumentationLecturer Touseef Yaqoob 7

    The sub-units of the CPU are instruction decode and CPU control,

    control of addressing for memory andI/O ports,

    data transfer control,

    data and address registers and

    arithmetic logic unit.

  • 7/27/2019 9 Intelligent Instruments

    8/45

    Electronic InstrumentationLecturer Touseef Yaqoob 8

    To keep track of the CPU steps, the processormaintains a special register, known as theprogram counter. The program counter points

    to (contains the address of) the nextinstruction to be executed. The instructionitself specifies

    the operation to be performed,

    the processor registers to be used and possibly data (or a pointer to data in

    memory).

  • 7/27/2019 9 Intelligent Instruments

    9/45

    Electronic InstrumentationLecturer Touseef Yaqoob 9

    Execution cycle of CPUThe CPU will typically perform the followingexecution cycle:

    use the program counter to fetch the nextinstruction. decode the instruction and fetch data from

    memory into internal registers as required, perform the instruction and put the result in

    another internal register and set status bits in the status register as

    required.

  • 7/27/2019 9 Intelligent Instruments

    10/45

    Electronic InstrumentationLecturer Touseef Yaqoob 10

    A typical computer design showing two

    multi-wire buses

  • 7/27/2019 9 Intelligent Instruments

    11/45

    Electronic InstrumentationLecturer Touseef Yaqoob 11

    Mechanical Arrangement Machines with the lowest cost and

    highest reliability are generally those

    with the fewest mechanical connectorsand socketed components, while thosewith more connectors and sockets are

    more easily expanded and maintained.

  • 7/27/2019 9 Intelligent Instruments

    12/45

    Electronic InstrumentationLecturer Touseef Yaqoob 12

    One design is to have all circuits onmechanically equivalent boards that plug intoa common bus, this is the most modulararrangement and is easily maintained. Analternative design is the single-boardcomputer which places the CPU and asubstantial portion of the memory and I/Ointerface circuits onto a single circuit board.This design is more compact and lessexpensive

  • 7/27/2019 9 Intelligent Instruments

    13/45

    Electronic InstrumentationLecturer Touseef Yaqoob 13

    Addressing Devices on the Bus The address determines the destination or

    source of information. Since the wires of a

    bus are common to all functional units,each unit will see all the data placed on thebus lines. The address lines are used withina receiving unit to determine if available

    information should be processed orignored. Each data repository on a commonbus will have a unique address.

  • 7/27/2019 9 Intelligent Instruments

    14/45

    Electronic InstrumentationLecturer Touseef Yaqoob 14

    When the CPU needs to transfer databetween itself and a particular location, itimplements a sequence of signals as specifiedby the read or write operation protocol forthe bus. The range of numbers that can berepresented by the available address lines(wires) on a bus is known as the addressspace. A range of numbers is used mostly toaccess information from memory and is thusknown as the memory address space.

  • 7/27/2019 9 Intelligent Instruments

    15/45

    Electronic InstrumentationLecturer Touseef Yaqoob 15

    Control of the Bus The information flow on the computer bus is

    time-multiplexed to allow different functional

    units to use the same bus lines at differenttimes. We will assume that only one devicetries to write (drive) a given bus line at anytime. A special unit, known as a bus master,

    has the responsibility for controlling the otherunits, which are correspondingly known asthe bus slaves.

  • 7/27/2019 9 Intelligent Instruments

    16/45

    Electronic InstrumentationLecturer Touseef Yaqoob 16

    Often a direct memory access (DMA)unit is allowed to communicate with a

    slave memory without going throughthe CPU bus master. This allowsmemory access at a higher speed than

    having to go through the intermediateCPU bus master.

  • 7/27/2019 9 Intelligent Instruments

    17/45

    Electronic InstrumentationLecturer Touseef Yaqoob 17

    Clock Lines

    The changes of state of all busedsignals are synchronized to one or more

    clock signals, which are distributed toall functional units on the bus.

  • 7/27/2019 9 Intelligent Instruments

    18/45

    Electronic InstrumentationLecturer Touseef Yaqoob 18

    Read and write operations between the CPUand memory units are the most common.

    One approach is for the CPU to set theaddress lines and data lines and then blindlyissue the control pulses, assuming that theslave unit will respond as needed within theallowed time. A more elegant but slightlyslower technique uses a handshakewhichrequires an acknowledgment response fromthe slave before proceeding.

  • 7/27/2019 9 Intelligent Instruments

    19/45

    Electronic InstrumentationLecturer Touseef Yaqoob 19

    Random Access Memory

    The random-access memory (RAM) supportsboth read and write operations. Integratedcircuit RAM comes in two main types: static RAMin which a single bit of memory is

    simply a digital flip-flop and requires onlycontinuous power to maintain its state.

    dynamic RAMin which a bit of memory is a

    storage capacitor in either the charged ordischarged condition. The term dynamic refers tothe need to periodically renew or refresh theslowly discharging capacitor.

  • 7/27/2019 9 Intelligent Instruments

    20/45

    Electronic InstrumentationLecturer Touseef Yaqoob 20

    Compared to dynamic memory, staticmemory has the following advantages.

    It is simpler to use, about ten timesfaster and more reliable. On the otherhand, it is more expensive, consumes

    more power and requires more physicalspace.

  • 7/27/2019 9 Intelligent Instruments

    21/45

    Electronic InstrumentationLecturer Touseef Yaqoob 21

    Both types of RAM are volatile, meaningthat stored information is lost when

    power is removed from the chip. Somecomputer designs provide a limitedamount of non-volatile read/write RAM

    storage by using special low-power(and slower) dynamic memoriespowered by re-chargeable batteries.

  • 7/27/2019 9 Intelligent Instruments

    22/45

    Electronic InstrumentationLecturer Touseef Yaqoob 22

    Read-Only Memory

    Another form of non-volatile random accessstorage is the read-only memory (ROM). Herea single memory bit is nothing more than aconnection that is either open or closed. Themost common ROM types are known as field-programmable (as opposed to factoryprogrammable). This programming process

    consists of stepping through all the bits andsetting the necessary ones by burning openthe fuse-like material associated with that bit.

  • 7/27/2019 9 Intelligent Instruments

    23/45

    Electronic InstrumentationLecturer Touseef Yaqoob 23

    There are many varieties of field-programmable ROM units:

    PROM - programmable read-only memory, EPROM - erasable PROM (using ultraviolet light),

    and

    EEPROM (E PROM) - electrically erasable PROMs.

    The most common uses of ROM memory in acomputer are to provide initialization such asmemory tests and disk bootstrapping.

  • 7/27/2019 9 Intelligent Instruments

    24/45

    Electronic InstrumentationLecturer Touseef Yaqoob 24

    I/O Ports

    Input and output ports are thepathways by which the CPU

    communicates with the world outsidethe computer. The pathway may beeither

    1-bit wide (bit-serial),

    8-bit wide (byte-serial), or

    16- to 32-bit wide (word-serial).

  • 7/27/2019 9 Intelligent Instruments

    25/45

    Electronic InstrumentationLecturer Touseef Yaqoob 25

    Interrupts

    Real-time applications require thecomputer to respond immediately to an

    external stimulus. The hardwareinterrupt can be used to suspend thecurrent sequence of instructions,

    perform a specific and usually short I/Otask, then return to the originalsequence of instructions.

  • 7/27/2019 9 Intelligent Instruments

    26/45

    Electronic InstrumentationLecturer Touseef Yaqoob 26

    Computers and DATA

  • 7/27/2019 9 Intelligent Instruments

    27/45

    Electronic InstrumentationLecturer Touseef Yaqoob 27

    Number Systems

  • 7/27/2019 9 Intelligent Instruments

    28/45

    Electronic InstrumentationLecturer Touseef Yaqoob 28

    Binary Numbers

  • 7/27/2019 9 Intelligent Instruments

    29/45

    Electronic InstrumentationLecturer Touseef Yaqoob 29

  • 7/27/2019 9 Intelligent Instruments

    30/45

    Electronic InstrumentationLecturer Touseef Yaqoob 30

  • 7/27/2019 9 Intelligent Instruments

    31/45

    Electronic InstrumentationLecturer Touseef Yaqoob 31

    Binary to decimal conversion

  • 7/27/2019 9 Intelligent Instruments

    32/45

    Electronic InstrumentationLecturer Touseef Yaqoob 32

    Decimal to binary conversion

  • 7/27/2019 9 Intelligent Instruments

    33/45

    Electronic InstrumentationLecturer Touseef Yaqoob 33

    Octal number system

  • 7/27/2019 9 Intelligent Instruments

    34/45

    Electronic InstrumentationLecturer Touseef Yaqoob 34

    Converting decimal to Octal

  • 7/27/2019 9 Intelligent Instruments

    35/45

    Electronic Instrumentation

    Lecturer Touseef Yaqoob 35

    Hexadecimal System

  • 7/27/2019 9 Intelligent Instruments

    36/45

    Electronic Instrumentation

    Lecturer Touseef Yaqoob 36

    Converting Decimal to Hexadecimal

  • 7/27/2019 9 Intelligent Instruments

    37/45

    Electronic Instrumentation

    Lecturer Touseef Yaqoob 37

    Programming and Program execution

    In most mode of usage, including useas a part of intelligent instruments,

    computers are involved in manipulatingdata. This requires data values to beinput, processed and output according

    to a sequence of operations defined bythe computer program.

  • 7/27/2019 9 Intelligent Instruments

    38/45

    Electronic Instrumentation

    Lecturer Touseef Yaqoob 38

    A/D and D/A converter

  • 7/27/2019 9 Intelligent Instruments

    39/45

    Electronic Instrumentation

    Lecturer Touseef Yaqoob 39

    D/A converter

  • 7/27/2019 9 Intelligent Instruments

    40/45

    Electronic Instrumentation

    Lecturer Touseef Yaqoob 40

    4 Bit D/A converter

  • 7/27/2019 9 Intelligent Instruments

    41/45

    Electronic Instrumentation

    Lecturer Touseef Yaqoob 41

    A/D converters

  • 7/27/2019 9 Intelligent Instruments

    42/45

    Electronic Instrumentation

    Lecturer Touseef Yaqoob 42

    Counter based A/D converter

  • 7/27/2019 9 Intelligent Instruments

    43/45

    Electronic Instrumentation

    Lecturer Touseef Yaqoob 43

  • 7/27/2019 9 Intelligent Instruments

    44/45

    Electronic Instrumentation

    Lecturer Touseef Yaqoob 44

  • 7/27/2019 9 Intelligent Instruments

    45/45

    Electronic Instrumentation

    Intelligent Instrument in use

    A typical intelligent flow rate measuringinstrument is a good example. The flow rateis proportional to the square root of the

    difference in pressure across orifice plate. Fora given flow rate this relationship is affectedboth by the temperature and pressure in thepipe. Intelligent instrument contains threetransducers a primary one measuring the

    pressure difference and secondary onesmeasuring absolute pressure andtemperature.