ECSE-4760 Computer Applications Laboratory
tory
INTRODUCTORY LAB EXPERIMENT
Number of Sessions 3
INTRODUCTION
For the past 40 years digital computers have literally been changing the face of our civilization,
and with it the means and methods of the engineering field. They introduced themselves at first to
the scientific and accounting fields as number crunchers, in a short while they conquered the data
filing/processing sector, and finally penetrated every place humans work and live, redefining all the
areas they came in contact with. Their presence and effects can be found today in every place, be it
an administrative office, a factory high bay area, a living room, or even a car and a plane. Yet their
power and impact to the society would have been much more limited in size and intensity, were it
not for the invention of the Integrated Circuit (IC) and it's brain child, the Microprocessor.
Its use revolutionized the industrial automation and control providing the average user with
inexpensive processing power previously available only through mainframe computing. Its miniature
size, low cost and power requirements, combined with is fast execution speed and accuracy opened
vast new application areas to data acquisition and process control. Every-day applications where
microprocessors are used as controllers, in place of their now extinct analog predecessors, range from
sophisticated robot manipulators and vision systems, to fuel and navigation control in automobiles
and planes, chemical processes, machine tools, medical equipment, microwave ovens and practically
all today's home electronic appliances. But by far the most common use of the microprocessors is as
central processing units (CPU) inside the microcomputers. Combined with powerful peripherals
and connected in networks these "desktop" computers successfully rival yesterday's "dinosaurs"
costing orders of magnitude more. Areas like digital signal processing, imaging and computer vision,
controls and robotics, all the more migrate from the old mainframe type processing, and depend on
fast (CISC or RISC) microcomputers to execute their task accurately and safely.
The purpose of this experiment, and the Computer Applications Laboratory in general, is to give
the student a taste of the challenges involved in using microcomputers as controllers in real life
applications. It does so by implementing well known and important theoretical results from the
areas of Automatic Control and Signal Processing into a set of experiments, where the
microcomputer with the use of peripheral devices, collects data from the process, processes it, and
returns useful information back to the process and reports to the supervisor if necessary.
2
EXPERIMENT OVERVIEW
This introductory experiment covers the basic architecture of a microcomputer and the
digitization of analog signals for processing. The purpose of this experiment is to introduce the
student to the microprocessor and its I/O devices and to give him/her a feel for its capabilities and its
limitations. The introductory programs provided have been designed to demonstrate access to the I/O
devices available at the lab bench, and to illustrate some of the features of I/O programming using
the Pentium PC for such a task. Each lab bench has its own dedicated computer and supporting
software and equipment.
The lab experiment is divided into the following sections:
Microcomputer overview. Here basic information on microcomputer architecture and data
acquisition system components are briefly reviewed.
Part I. Consists of a set of pre-programmed signal processing functions to be observed and
analyzed. This part serves to demonstrate how the hardware is accessed, and how data is
retrieved, processed, and returned back to the application.
Part II. A set of functions the student must write or modify that use some of the I/O devices
including the front panel I/O fields, A/D and D/A converters.
All programs in parts I and II are to be developed using National Instruments LabVIEW visual
programming environment available on the lab computer. This is an integrated development
environment where the user can interactively develop/debug graphical data acquisition and
processing programs. More details on how to use LabVIEW follow in later sections.
It's expected that students come prepared for the labs, having read the lab
procedures, necessary references, and anticipated some of the results before starting
experiments. Copies of the programs are also available for anyone desiring further information. It
is highly recommended that you take useful notes. Feel free to ask questions, as the information
presented in this lab will be needed in the future when you use the system. In the beginning,
emphasis should be placed on the procedures to be followed rather than on the programs themselves.
As you progress, you can go back and study the programs so that you can see the procedures as a
logical sequence rather than frustrating cookbook instructions. The instructor will also point out
where the reference material is located. Note the limitations of the I/O devices as they are discussed.
The limitations are important since some of the devices can easily be destroyed if the limitations are
exceeded!
The programs that are used to implement the various filters have been supplied. It is your job to
input and monitor some of the parameters of the process through the I/O devices at each lab bench.
Some of these parameters will be varied and you will see how the variations will affect the processes.
Later, you will develop some of your own programs during the project portion of the lab.
During the course of the lab, it is hoped that you will discover that the microcomputer is an
important, versatile and indispensable tool in the electrical engineering field. The applications of the
microcomputer are endless and perhaps only limited by the engineer's imagination.
MICROCOMPUTER ARCHITECTURE SUMMARY
Microcomputers vary significantly in processing power and general capabilities depending on the
components they are built of. Yet they all consist of the same structural blocks, summarized below:
3
CPU
It is the most important and complex component as mentioned at the beginning. It's
implemented as a VLSI chip and more than one microprocessors may act as Central
Processing Units. Its basic architecture consists of storage elements called registers
where data is stored for fast retrieval, computational circuits designated as arithmetic-
logic units (ALUs) where all standard integer arithmetic, logical and string operations
take place, the control and timing block responsible for synchronizing data transfers, and
the input-output block responsible for communicating with the outside devices. Useful
extensions include the memory management block, for manipulation of the external
memory, floating point math coprocessor, cache memory for fast storage of the next data
to be processed, or other specialized function blocks.
The CPU selects the peripherals to "talk" to, using the address bus, a set of wires
carrying uniquely identifying signal combinations, and exchanges information through
the data bus. Its task consists of fetching the control instructions, decoding, interpreting
and carrying them out.
CPUs are classified as 8bit, 16bit, 32bit or 64bit depending on the size of their registers
and data bus, or as CISC, RISC depending on the instruction capabilities, or general and
specialized (graphics, math, signal/image processing).
RAM
Random Access Memory is the main memory of the system where programs and data are
stored. Also known as read/write memory, all its information is lost when the computer is
turned off. RAM is realized using semiconductor flip-flops whereby binary information is
stored in the state of the transistor flip-flop circuits.
Its building structure depends on the CPU type, and its major drawback (in dynamic
RAM) is that it needs regular refreshing in order not to lose data. All information is
processed in binary (1/0) form and represented inside the computer using signed 2's
complement representation.
ROM
Read Only Memory is used for storing permanent information. Only readable and non-
volatile, its common use is to boot up the computer and load the operating system to take
over. Data stored in it, may include routines to be used to access other hardware like the
screen and the keyboard.
Keyboard Used to transmit information from the user (human) to the computer.
Video I/O Monitor combined with the video controller card and used to return information to
human understandable form as drawings (colored or not) and characters. Uses it's own
RAM and since it takes considerable time to prepare the information, dedicated CPUs
are often used.
Storage
Included are floppy disks, hard disks and backup tape drives, and are used to
permanently store i