Chapter 1:
Microprocessor based
Instrumentation System
Text books:
1. D. V. Hall, “Microprocessor and Interfacing, Programming and Hardware”,
Revised 2nd Edition 2006, Tata McGraw Hill
2. Ramesh S. Gaonkar, “Microprocessor Architecture, Programming and
Application with 8085”, 5th Edition 2002, Prentice Hall
• A microprocessor is a computational, programmable electronic device that is
able to perform complex tasks from basic computations logically arranged in a
program.
• multi-purpose device: Using many different programs to achieve many
different objectives, the microprocessor is often used in multiple applications.
• Instrumentation means to employ a method/process/apparatus to measure
physical parameters.
• Electrical/ Electronic transducers convert the real world physical parameters
into equivalent electrical signals.
• Calibration means to equate electrical signals to physical values/units.
Measurement is performed on a calibrated scale.
• A microprocessor based instrumentation system is centered around a
microprocessor that performs additional data processing/analysis on collected
digital data.
• The microprocessor based instrumentation system is versatile, reliable and
efficient and often has improved accuracy.
• Another advantage is that such a system can be used to automate and control
many processes such as an assembly line in factories, power plants, ATM
machine, etc
• Benefits of Microprocessor Based Instrumentation System
– Multipurpose: The same system can be used in different applications by simply
replacing with a new program and if necessary, the transducers.
– Immense computational power to improve accuracy and efficiency
– to achieve automation and control.
– Data logging in memory aids in interpolation and extrapolation of data, periodicity
and pattern recognition. Data can be further transmitted to remote servers.
– Parallel processing in modern processors improves speed of computation and
allows multitasking and multiplexing of many processes.
• Demerits
– Significant additional complexity and cost.
– Additional knowledge of machine dependant programming language to program
the microprocessor
– Tradeoff between complexity+cost versus system efficiency must be carefully
weighed while analyzing for feasibility.
• Benchmarks
– Speed: The greater the speed of the microprocessor, faster the data can be
sampled. Speed is critical especially for high bandwidth signals.
– Memory: The amount of memory required depends on the amount of data
required for decision making/data analysis, hence, is application specific. There is
always a tradeoff between accuracy and memory requirement and a careful
optimum must be chosen.
Open Loop & Closed Loop
Control System
• The inputs or the process
variables to any system (open/
closed loop) are provided from an
instrumentation system.
• The o/p of an open loop system is
based on the i/p(s) only
• Simple and low cost
• Manual adjustments for control
• An open loop control system may
or may not be microprocessor
based (need basis)
• In a closed loop system, the o/p is
fed back as i/p through a feedback
path.
• The o/p is based on the difference
between desired o/p and the
actual o/p
• High cost and complexity
• Adaptive: the system keeps the
difference between desired o/p
and actual o/p to zero.
• Usually microprocessor based.
Open Loop
System
o/pi/p Open Loop
System+i/p
o/p
-
+
Microcomputer Interfacing
• Interfacing means to connect I/O devices (here, the transducers) to the
microprocessor so as to enable communication/data flow between them.
• Interfaces (Ports) are hardware points (with necessary logic circuits) where
to connect the I/O devices
PC Interfacing Techniques
• The personal computer provides several different interfaces to connect peripherals
which are listed here
• I/O Bus: The system bus is made externally available for direct connection
through internal expansion slots on the motherboard. E.g: PCI bus
• Parallel ports: The data bus along with several control lines are made
individually available for external connection. E.g: LPT (Printer port)
• Serial ports: A single data line and some handshake signalling lines are
provided. E.g: COM1, COM2 communication interface
• USB ports: These are much versatile, faster and user-friendly serial ports
available in modern day computers
I/O addressing
• I/O addresses are used to identify between different
I/O devices.
• Two types of I/O addresses:
– Memory mapped I/O addresses: In the 8085, these are 16-
bit addresses, just like memory addresses and are used
just the same with MOV instructions in programs. In fact,
the data lines from the corresponding memory location is
hardwired to the I/O device and the IO/M control line
indicates memory access.
– I/O mapped addresses: In the 8085, these are 8-bit
addresses (also called port numbers) and are used with IN
and OUT instructions. The IO/M control line is asserted
high to indicate IO.
I/O address decoding
• The I/O address is decoded and then used to select/
enable/ activate the particular I/O device or their
buffers/ latches.
• Unique address decoding: The particular I/O device will
be activated with one and only one unique address.
The decoding circuitry decodes all address lines (A0:A7
for I/O mapped address; A0:A15 for memory mapped
I/O)
• Non-unique address decoding: Some of the least
significant address lines are unused in the decoding
circuitry providing a range of addresses for the
particular I/O device.
Types of I/O
• Programmed I/O (Polling): The microprocessor continuously monitors
(programmed in a loop) the I/O port or a flag associated with the port for
the arrival of new valid data (for input port)/ an indicator that the data has
been received (for output port). Programmed I/O is useful with such I/O
which continuously send/receive data. E.g: display
• Interrupt driven I/O: The microprocessor only serves the I/O port
(send/receive) when an interrupt corresponding to the particular I/O
device is raised. Interrupt-driven I/O is useful when the nature of data is
intermittent.
• Direct Memory Access (DMA): The microprocessor is always involved in
I/O except in DMA, where direct data transfer between I/O device and
memory in huge volumes takes place. The microprocessor simply releases
the data bus and address bus when a DMA request is received, such as
when loading the OS/ programs from the hard disk to memory. Valuable
time and resource is saved.

1.instrumentation ii

  • 1.
    Chapter 1: Microprocessor based InstrumentationSystem Text books: 1. D. V. Hall, “Microprocessor and Interfacing, Programming and Hardware”, Revised 2nd Edition 2006, Tata McGraw Hill 2. Ramesh S. Gaonkar, “Microprocessor Architecture, Programming and Application with 8085”, 5th Edition 2002, Prentice Hall
  • 2.
    • A microprocessoris a computational, programmable electronic device that is able to perform complex tasks from basic computations logically arranged in a program. • multi-purpose device: Using many different programs to achieve many different objectives, the microprocessor is often used in multiple applications. • Instrumentation means to employ a method/process/apparatus to measure physical parameters. • Electrical/ Electronic transducers convert the real world physical parameters into equivalent electrical signals. • Calibration means to equate electrical signals to physical values/units. Measurement is performed on a calibrated scale. • A microprocessor based instrumentation system is centered around a microprocessor that performs additional data processing/analysis on collected digital data. • The microprocessor based instrumentation system is versatile, reliable and efficient and often has improved accuracy. • Another advantage is that such a system can be used to automate and control many processes such as an assembly line in factories, power plants, ATM machine, etc
  • 3.
    • Benefits ofMicroprocessor Based Instrumentation System – Multipurpose: The same system can be used in different applications by simply replacing with a new program and if necessary, the transducers. – Immense computational power to improve accuracy and efficiency – to achieve automation and control. – Data logging in memory aids in interpolation and extrapolation of data, periodicity and pattern recognition. Data can be further transmitted to remote servers. – Parallel processing in modern processors improves speed of computation and allows multitasking and multiplexing of many processes. • Demerits – Significant additional complexity and cost. – Additional knowledge of machine dependant programming language to program the microprocessor – Tradeoff between complexity+cost versus system efficiency must be carefully weighed while analyzing for feasibility. • Benchmarks – Speed: The greater the speed of the microprocessor, faster the data can be sampled. Speed is critical especially for high bandwidth signals. – Memory: The amount of memory required depends on the amount of data required for decision making/data analysis, hence, is application specific. There is always a tradeoff between accuracy and memory requirement and a careful optimum must be chosen.
  • 4.
    Open Loop &Closed Loop Control System • The inputs or the process variables to any system (open/ closed loop) are provided from an instrumentation system. • The o/p of an open loop system is based on the i/p(s) only • Simple and low cost • Manual adjustments for control • An open loop control system may or may not be microprocessor based (need basis) • In a closed loop system, the o/p is fed back as i/p through a feedback path. • The o/p is based on the difference between desired o/p and the actual o/p • High cost and complexity • Adaptive: the system keeps the difference between desired o/p and actual o/p to zero. • Usually microprocessor based. Open Loop System o/pi/p Open Loop System+i/p o/p - +
  • 5.
    Microcomputer Interfacing • Interfacingmeans to connect I/O devices (here, the transducers) to the microprocessor so as to enable communication/data flow between them. • Interfaces (Ports) are hardware points (with necessary logic circuits) where to connect the I/O devices PC Interfacing Techniques • The personal computer provides several different interfaces to connect peripherals which are listed here • I/O Bus: The system bus is made externally available for direct connection through internal expansion slots on the motherboard. E.g: PCI bus • Parallel ports: The data bus along with several control lines are made individually available for external connection. E.g: LPT (Printer port) • Serial ports: A single data line and some handshake signalling lines are provided. E.g: COM1, COM2 communication interface • USB ports: These are much versatile, faster and user-friendly serial ports available in modern day computers
  • 6.
    I/O addressing • I/Oaddresses are used to identify between different I/O devices. • Two types of I/O addresses: – Memory mapped I/O addresses: In the 8085, these are 16- bit addresses, just like memory addresses and are used just the same with MOV instructions in programs. In fact, the data lines from the corresponding memory location is hardwired to the I/O device and the IO/M control line indicates memory access. – I/O mapped addresses: In the 8085, these are 8-bit addresses (also called port numbers) and are used with IN and OUT instructions. The IO/M control line is asserted high to indicate IO.
  • 7.
    I/O address decoding •The I/O address is decoded and then used to select/ enable/ activate the particular I/O device or their buffers/ latches. • Unique address decoding: The particular I/O device will be activated with one and only one unique address. The decoding circuitry decodes all address lines (A0:A7 for I/O mapped address; A0:A15 for memory mapped I/O) • Non-unique address decoding: Some of the least significant address lines are unused in the decoding circuitry providing a range of addresses for the particular I/O device.
  • 8.
    Types of I/O •Programmed I/O (Polling): The microprocessor continuously monitors (programmed in a loop) the I/O port or a flag associated with the port for the arrival of new valid data (for input port)/ an indicator that the data has been received (for output port). Programmed I/O is useful with such I/O which continuously send/receive data. E.g: display • Interrupt driven I/O: The microprocessor only serves the I/O port (send/receive) when an interrupt corresponding to the particular I/O device is raised. Interrupt-driven I/O is useful when the nature of data is intermittent. • Direct Memory Access (DMA): The microprocessor is always involved in I/O except in DMA, where direct data transfer between I/O device and memory in huge volumes takes place. The microprocessor simply releases the data bus and address bus when a DMA request is received, such as when loading the OS/ programs from the hard disk to memory. Valuable time and resource is saved.