Microprocessor and
Microcontroller Fundamentals
MCU 3053
Mechatronics System Design
Puan Juwita binti Mad Juhani
CREATED BY :
Nurhidayah bt zamat
Fatin zafirah bt ramli
Hafizuddin bin Mohama
MICROPROCESSOR
Amicroprocessoris a computer processor which incorporates
the functions of a computer's central processing unit (CPU) on a
single integrated circuit (IC), or at most a few integrated
circuits.
Microprocessor System
MICROCONTROLLER
Amicrocontrolleris a small computer (SoC) on a single
integrated circuit containing a processor core, memory, and
programmable input/output peripherals.
Microcontroller System
Can you
see the
different ?
?
Can you
see the
different ?
?
System Design
Microprocessor
A Microprocessor, popularly known as computer on a chip
in its early days, is a general purpose central processing unit
(CPU) fabricated on a single integrated circuit (IC) and is a
complete digital computer (later microcontroller is
considered to be more accurate form of complete computer).
It is a small but very powerful electronic brain that operates
at a blistering speed and is often used to carry out
instructions of a computer program in order to perform
arithmetic and logical operations, storing the data, system
control, input / output operations etc. as per the instructions.
The key term in the definition of a microprocessor is general
purpose. It means that, with the help of a microprocessor,
one can build a simple system or a large and complex
machine around it with a few extra components as per the
application.
The main task of a microprocessor is to accept data as input
from input devices then process this data according to the
instructions and provide the result of these instructions as
output through output devices. Microprocessor is an example
of sequential logic device as it has memory internally and
uses it to store instructions.
There are five important components in a microprocessor.
They are Arithmetic and Logic Unit (ALU), Control Unit,
Registers, Instruction Decoder and Data Bus but the first
three are considered significant components. The block
diagram of a microprocessor with these basic components is
shown below.
The internal structure of a microprocessor is shown
below.
INTERNAL STRUCTURE OF MP
Earlier microprocessors made use of Von Neumann
architecture where the data and instructions
(programs) are stored in the same memory. Even
though this architecture is simple, there are many
draw backs.
One of the major drawbacks is that instruction and
data cannot be accessed at the same time as they
share a single data bus. This often degrades the
overall performance of the device.
Later, Harvard architecture is introduced which
makes use of separate program and data memories
with separate buses so that both data and
instructions can be accessed at the same time.
Later Modified Harvard Architecture is developed in
which the program memory is accessed as if it were
data memory.
There are three basic characteristics used to differentiate
microprocessors. They are instruction set, bandwidth and clock
speed. Instruction set is related to programming of the
microprocessor which mainly consists of instructions that a
microprocessor can execute. Bandwidth indicates maximum
number of bits processed in a single instruction. Clock speed gives
no. of instructions a processor can execute per second. Usually
clock speed is in MHz (Mega Hertz) or GHz (Giga Hertz). Generally
the characteristics bandwidth and clock speed are looked together.
The higher the values of both these characteristics, the more
powerful the processor is.
Instruction set or instruction set architecture (ISA) also plays an
important role in the design and functioning of a processor.
Microprocessors are classified as either CISC (Complex Instruction
Set Computer) or RISC (Reduced Instruction Set Computer).
CISC architecture consists of full set of instructions that are
complex, larger, have more computational power and so on. A
single CISC instruction can be used to execute several low-level
operations, multi-step operations and multiple addressing modes.
The execution time of these instructions is long. Intels X86 is an
example of CISC architecture.
RISC architecture was developed by realizing that instead of using
full set of instructions, only the frequently used instructions are
sufficient. In this architecture, the instructions are small and highly
optimized. RISC processors are used where execution time of the
instruction should be less and cost of development is less. The ARM
devices are based on ARM architecture which is a subset of RISC.
Microcontroller
The main reason for the development of microcontroller is
to overcome the only drawback of the microprocessor.
Even though microprocessors are powerful devices, they
require external chips like RAM, ROM, Input / Output ports
and other components in order to design a complete
working system.
This made it economically difficult to develop computerized
consumer appliances on a large scale as the system cost is
very high.
Microcontrollers are the devices that actually fit the profile
Computer on a chip as it consists of a main processing
unit or processor along with some other components that
are necessary to make it a complete computer.
The components that are present on a typical
microcontroller IC are CPU, memory, input / output ports
and timers. The first microcontroller was developed in 1971
by Texas Instruments and is called TMS 1000. It was made
available for commercial use in 1974. The block diagram of
a microcontroller is shown below.
Microcontrollers are basically used in embedded systems.
Computerized or digital control of devices is made plausible
with the development of microcontrollers. The development
process of microcontroller is similar to that of a
microprocessor.
Microcontrollers can be classified based on bus width,
memory structure and instruction set. Bus width indicates
the size of the data bus. Microcontrollers can be classified as
8 bit, 16 bit or 32 bit based on the bus width.
Higher bus widths often result in better performance.
Microcontrollers can be divided into two types based on their
memory structures: Embedded Memory and External
Memory. In case of embedded memory microcontrollers, the
required data and program memory is embedded into the IC.
Whereas external memory microcontrollers do not have
program memory embedded on them and require an
external chip for the same.
Now a day, all microcontrollers are embedded memory
microcontrollers. The classification based on instruction set
is similar to that of a microprocessor. They can be either
CISC or RISC. Majority of microcontrollers follow CISC
architecture with over 80 instructions. Microcontrollers can
also be divided based on their computer architecture into
von Neumann and Harvard.
MICROPROCESSOR
MICROCONTROLLER
Microprocessor assimilates
the function of a central
processing unit (CPU) on to a
single integrated circuit (IC).
Microcontroller can be
considered as a small
computer which has a
processor and some other
components in order to make
it a computer.
Microprocessors are mainly
Microcontrollers are used in
used in designing general
automatically controlled
purpose systems from small
devices.
to large and complex systems
like super computers.
Computational capacity of
microprocessor is very high.
Hence can perform complex
tasks.
Less computational capacity
when compared to
microprocessors. Usually used
for simpler tasks.
A microprocessor based
A microcontroller based
system can perform numerous system can perform single or
tasks.
very few tasks.
Microprocessors have
integrated Math Coprocessor.
Complex mathematical
calculations which involve
floating point can be
performed with great ease.
Microcontrollers do not have
math coprocessors. They use
software to perform floating
point calculations which slows
down the device.
The main task of
microprocessor is to perform
the instruction cycle
repeatedly. This includes fetch,
decode and execute.
In addition to performing the
tasks of fetch, decode and
execute, a microcontroller also
controls its environment based
on the output of the
instruction cycle.
In order to build or design a
system (computer), a
microprocessor has to be
connected externally to
some other components like
Memory (RAM and ROM) and
Input / Output ports.
The IC of a microcontroller
has memory (both RAM and
ROM) integrated on it along
with some other components
like I / O devices and timers.
The overall cost of a system
built using a microprocessor
is high. This is because of
the requirement of external
components.
Cost of a system built using
a microcontroller is less as
all the components are
readily available.
Generally microprocessors
are not used in real time
systems as they are severely
dependent on several other
components.
Microcontrollers are used to
handle real time tasks as
they are single programmed,
self sufficient and task
oriented devices.
Have few bit manipulation
instructions
Bit manipulation is powerful
and widely used feature in
microcontrollers. They have
numerous bit manipulation
instructions.
Application of
microcontroller and
microprocessor
Microcontrollers are intended for embedded devices,
in comparison to the micro-processors which are used
in PCs or other all-purpose devices. Microcontrollers
are employed in automatically managed inventions
and appliances like- power tools, implantable medical
devices, automobile engine control systems, , office
machines, remote controls appliances, toys and many
more embedded systems. By dipping the size and
expenditure in comparison to a design that make use
of a different micro-processor, I/O devices and
memory, micro-controllers formulate it inexpensive to
digitally control more & more appliances and
operations. Mixed signal micro-controllers are
general; putting together analog constituents
required controlling non-digital electronic structures.
Application of Microcontroller in Day to Day Life
Devices:
Light sensing & controlling devices
Temperature sensing and controlling devices
Fire detection & safety devices
Industrial instrumentation devices
Process control devices
Application of Microcontroller in Industrial Control
Devices:
Industrial instrumentation devices
Process control devices
Application of Microcontroller in Metering &
Measurement Devices:
Volt Meter
Measuring revolving objects
Current meter
Hand-held metering systems
Microprocessors are a mass storage device. They
are the advanced form of computers. They are also
called as microcomputers. The impact of
microprocessor in different lures of fields is
significant. The availability of low cost, low power
and small weight, computing capability makes it
useful in different applications. Now a days, a
microprocessor based systems are used in
instructions, automatic testing product, speed
control of motors, traffic light control , light control
of furnaces etc. Some of the important areas are
mentioned below:
Application of Microprocessor in Control:
Microprocessor based controllers are available in home appliances, such
as microwave oven, washing machine etc., microprocessors are being
used in controlling various parameters like speed, pressure, temperature
etc. These are used with the help of suitable transduction.
Application of Microprocessor in Communication:
Microprocessors are being used in a wide range of communication
equipment. In telephone industry, these are used in digital telephone
sets. Telephone exchanges and modem etc. The use of microprocessor in
television, satellite communication have made teleconferencing
possible. Railway reservation and air reservation system also uses this
technology. LAN and WAN for communication of vertical information
through computer network.
Application of Microprocessor in Office Automation and
Publication:
Microprocessor based micro computer with software packages has
changed the office environment. Microprocessors based systems are
being used for word processing, spread sheet operations, storage etc.
The microprocessor has revolutionize the publication technology.
Application of Microprocessor in Consumer:
The use of microprocessor in toys, entertainment equipment
and home applications is making them more entertaining
and full of features. The use of microprocessors is more
widespread and popular. Now the Microprocessors are used
in :
1.Calculators
2.Accounting system
3.Games machine
4.Complex Industrial Controllers
5.Traffic light Control
6.Data acquisition systems
7.Multi user, multi-function environments
8.Military applications
9.Communication systems