Ch 7. Micrprocessors and Microcontrollers (2)
Ch 7. Micrprocessors and Microcontrollers (2)
7.1 Introduction: A simple control system just makes sure that the output is achieved as per the
input by giving the feedback and correcting the input, if there is any deviation. It is only
following the instructions given and it could not compensate for changing conditions. Like
human being it has to remember what it has done and check other conditions such as the coolant
is on or wear of mechanisms or car door is locked or not. Engineers and computer scientists
looked forward to the possibility of building digital devices that could modify their own
programming, much the same as the human brain adapts. Hence, a device that is much more
complex is required. First, it should read/write memory that can be easily accessed. Secondly, it
needs some form of logic to process the data stored in memory. Because standard and Boolean
arithmetic functions are so useful, it can use an Arithmetic Logic Unit (ALU). Finally, a device
is needed that controls how and where data flows between the memory, the ALU, and the outside
world. This is called Control Unit.
Putting these components together (read/write memory, ALU, and control unit) results in a
digital device that is typically called a processor. If minimal memory is used, and all the
necessary components are contained on a single integrated circuit, it is called a microprocessor.
When combined with the necessary bus-control support circuitry, it is known as a Central
Processing Unit, or CPU. As one might guess, carrying out even simple instructions is a tedious
process. Several steps are necessary for the Control Unit to complete the simplest of
mathematical procedures.
A microprocessor is a single, very-large-scale-integration (VLSI) chip that contains many
digital circuits that perform arithmetic, logic, communication, and control functions. When a
microprocessor is packaged on a printed circuit board with other components, such as interface
and memory chips, the resulting assembly is referred to as a microcomputer. But, an assembly
language program written for a microprocessor is not transferable to a computer with another
microprocessor unless the two microprocessors are compatible in their machine codes.
Therefore, a microprocessor is a small computer or CPU (central processing unit) used to do
arithmetic and logical operation, controlling the system and storing the data etc. Today’s
microcomputer perhaps more commonly represented by the ubiquitous personal computer is a
basic tool in the engineering profession. The common thread in its application in various
engineering fields is its use in digital data acquisition instruments and digital controllers.
Microcomputers are present in all engineering laboratories, plants and production facilities due
to the numerous advantages as below.
• A single microcomputer can perform computations and send signals from many different
sensors measuring different parameters to many different display, storage, or control devices,
under control of a single software program.
• The microcomputer is easily reprogrammed for any changes or adjustments to the measurement
or control procedures, or in the computations.
• A permanent record of the activities performed by the microcomputer can be easily stored and
retained.
It should be evident that the microcomputer can perform repetitive tasks, or tasks that require
great accuracy and repeatability, far better than could be expected of human operators and analog
instruments.
Definition of the Microprocessor: The microprocessor is a programmable device that takes in
numbers, performs on them arithmetic or logical operations according to the program stored in
memory and then produces other numbers as a result.
Or
A microprocessor is a single, very-large-scale-integration (VLSI) chip that contains many
digital circuits that perform arithmetic, logic, communication, and control functions.
Nowadays, microprocessor can be seen in almost all types of electronics devices like mobile
phones, printers, washing machines etc.
7.2 Architecture of a Microprocessor: The microprocessor manipulates data, controls the
timing of various operations, and communicates with input/output devices and memory. The
internal logic design of a microprocessor is called its architecture. The microprocessor consists
of three basic units. The basic units are the central processing unit (CPU) to recognize and carry
out program instructions, the input and output circuit interface, and the memory to retain the
program instructions and data. The input/output arrangement is used to send out or feed data.
The bus is a set of shared communication lines that serves as the central nervous system of the
microcomputer.
The data bus is used to transfer a word to and from the CPU. The data lines are used to
communicate words to and from data registers in the various system components such as
memory, the CPU, and input/output (I/O) peripherals. The address bus bar carries signals which
indicate what data is to be found and selected. The address lines are used to select devices on
the bus or specific data locations within memory. Devices usually have a combinational logic
address decoder circuit that identifies the address code and activates the device. The control bus
is the means by which signals are sent to synchronize the separate elements. The control lines
transmit read and write signals, the system clock signal, and other control signals such as system
interrupts.
Fig. 7.2
A key to a CPU’s operation is the storage and retrieval of data from a memory device. Different
types of memory include read-only memory (ROM), random access memory (RAM), and
erasable-programmable ROM (EPROM). ROM is used for permanent storage of data that the
CPU can read, but the CPU cannot write data to ROM. ROM does not require a power supply to
retain its data and therefore is called nonvolatile memory. RAM can be read from or written to at
any time, provided power is maintained. The data in RAM is considered volatile because it is lost
when power is removed.
Fig. 7.3
The different types of microprocessors are 8085, 8086, z80, and 68000. Figure 7.1 shows the
basic structure of a microprocessor. The internal architecture of the 8085 microprocessor
determines how an operation can be performed with the given data and also which operations
can be performed. These operations are (a) storing 8-bit data, (b) performing arithmetic and
logical operations, (c) testing for conditions, (d) sequencing the execution of instructions, and (e)
storing data temporarily during execution in the defined read/write memory location.
To perform these operations, the microprocessor requires registers, an arithmetic logic unit, a
control logic unit, and internal buses. The 8085 is an 8-bit general purpose microprocessor
capable of addressing 64K of memory. The device has 40 pins, requires a +5 V single power
supply, and can operate with a 3-MHz single phase clock.
7.3 Microcontroller: In microprocessors, the memory and various input and output
arrangements are all arranged in one chip called the microcontroller. For a microprocessor to
give a system that can be used for control, additional chips are necessary. For instance, memory
devices for program and data storage and input/output ports allow it to communicate with the
external world and receive signals from it. The microcontroller is the integration of a
microprocessor with memory and input/output interfaces and other peripherals such as a timer on
a single chip. Figure 7.4 shows the general block diagram of a microcontroller.
The general microcontroller has pins for external connection of inputs and outputs, power, clock,
and control signals. The pins for the input and output are grouped into units called input/output
ports. Usually, such ports have eight lines in order to be able to transfer an 8-bit word of data.
The Motorola 68HC II, the Intel 8051, and PIC 16C6x17x are examples of 8-bit
microcontrollers, which have the data path of 8 bits. The Motorola 68HC16 is a 16-bit
microcontroller and Motorola 8300 is a 32-bit microcontroller. These have a limited amount of
ROM (read only memory) and RAM (random access memory) and are widely used for
embedded control systems.
Factors that have driven development of the microcontroller are low cost, versatility, ease of
programming, and small size. Microcontrollers are attractive in mechatronic system design
because their small size and broad functionality allow them to be physically embedded in a
system to perform all of the necessary control functions.
Microcontrollers are used in a wide array of applications including home appliances,
entertainment equipment, telecommunication equipment, automobiles, trucks, airplanes, toys,
and office equipment. All these products involve devices that require some sort of intelligent
control based on various inputs. For example, the microcontroller in a microwave oven monitors
the control panel for user input, updates the graphical displays when necessary, and controls the
timing and cooking functions. In an automobile, there are many microcontrollers to control
various subsystems, including cruise control, antilock braking, ignition control, keyless entry,
environmental control, and air and fuel flow. An office copy machine controls actuators to feed
paper, uses photo sensors to scan a page, sends or receives data via a network connection, and
provides a user interface complete with menu-driven controls.
The digital I/O ports allow binary data to be transferred to and from the microcontroller using
external pins on the IC. These pins can be used to read the state of switches and on-off sensors,
to interface to external A/D and D/A converters, to control digital displays, and to control on-off
actuators. The I/O ports can also be used to transmit signals to and from other microcontrollers to
coordinate various functions.
7.4 Differences: There is no strict border between microprocessors and microcontrollers.
S. No Microprocessor Microcontroller
It is suitable for general purpose
1 It is suitable for special purpose system.
system.
Memory, Timer/Counter, I/O Ports Memory, Timer/Counter, I/O Ports are inbuilt in
2
are not inbuilt in this chip. this chip.
It has one or two bit handling
3 It has many bit handling instructions.
instructions.
Time taken to complete a process is
4 Time taken to complete a process is less.
more.
Microprocessors based system Microprocessors based system requires less
5
requires more hardware. hardware reducing PCB size and increasing the
reliability.
Fig. 7.6