CH5 Part 1

Download as pdf or txt
Download as pdf or txt
You are on page 1of 22

Chapter 5: Micro-controller Systems

and Applications

INTRODUCTION TO MICROCONTROLLER
At the end of this chapter, the students
should be able to.…

1. Explain how does a microcontroller differ from a


microprocessor
2. Explain the different ways of classifying the types of
microcontrollers
What is
Microcontroller and Microprocessor?

A microprocessor is a controlling unit of a


micro-computer wrapped inside a small
chip. It performs Arithmetic Logical Unit
(ALU) operations and communicates with
the other devices connected with it. It is a
single Integrated Circuit in which several
functions are combined.
A microcontroller is a chip optimized to
control electronic devices. It is stored in a
single integrated circuit which is dedicated
to performing a particular task and execute
one specific application.
It is specially designed circuits for
embedded applications and is widely used
in automatically controlled electronic
devices. It contains memory, processor,
and programmable I/O.
What is microprocessor?

Microprocesso
• To control some r • Miniaturization – onto
process one chip
• Built from logic • Smaller size – fit onto • Contains CPU,
components small cct board Memory, I/O, timers
• Large, heavy boxes • Eg: Zilog Z80, Intel and interrupt (Fig. 1.2)
8088, Motorola 6809,
etc.
• ~ a CPU (Fig. 1.1)
Microcontrolle
Controller
r

Intel 8085 – 8-bit Intel 8051 – 8-bit


***The CCT board = Intel 8086/8088 – 16-bit Intel 8096 – 16-bit
Command, Control &
Telemetry Board
ARM 32 bit
Architecture of Microprocessor
Microprocessors and Microcontrollers

Figure 1.2 A block diagram of a microcontroller


Difference of
Microcontroller and Microprocessor
Terminology used for microcontrollers

CPU

CONTROL/MONITOR FETCH, DECODE AND


(INPUT/OUTPUT) DEVICES EXECUTE AN INSTRUCTION

THE BUSES:
ADDRESS, DATA,
AND CONTROL
Terminology used for microcontrollers

Machine Cycle
To execute an instruction–the processor
must:
1. Fetch the instruction from memory
2. Decode the instruction
3. Execute the instruction
4. Store the result back in the memory.
CPU (Central Processing ONE machine cycle = ‘X’ clock cycles
Unit) (‘X’ depends on the particular
instruction being executed).
• Brain of the computer
• Admin all activities in the
system
• Perform all data PROCESSO
operations based on Faster
R IS
FASTER!
instruction set (set of execution of
instructions
binary codes) Time to
complete a
cycle ↓
• Fetching
Clock cycle
• Executing ↓
Terminology used for microcontrollers

Fetching and Executing an Instruction

• Fetching involves the following steps:


• Contents of PC are placed on address bus.
• READ signal is activated.
• Data (instruction opcode) are read from RAM and placed
on data bus.
• Opcode is latched into the CPU’s internal instruction
register.
• PC is incremented to prepare for the next fetch from
memory.

• Execution involves: decoding the opcode and generating


control signals to gate internal registers in and out of the
ALU and to signal the ALU to perform the specified
operation
Terminology used for microcontrollers

Fetching and Executing an Instruction


Terminology used for microcontrollers

The Buses : Address, Data, and Control

• A BUS is a collection of wires carrying information with a common


purpose.
• For each read or write operation, the CPU specifies the location of the
data or instruction by placing an address on the address bus, then
activates a signal on the control bus indicating whether the operation is
read or write.
• READ OPERATIONS retrieve a byte of data from memory at the location
specified and place it on the data bus. CPU reads the data and places it
in one of its internal registers.
• WRITE OPERATIONS put data from CPU on the data bus and store it in
the location specified.
Terminology used for microcontrollers

DATA BUS carries information between the CPU and


memory or between the CPU and I/O devices.

CONTROL BUS carries control signals supplied by the


CPU to synchronize the movement of information on the
address and data bus.
Terminology used for microcontrollers

CONTROL/MONITOR
(INPUT/OUTPUT) DEVICES

• CONTROL DEVICES are


outputs, or actuators, that can
affect the world around them
when supplied with a voltage
or current.

• MONITORING DEVICES are


inputs, or sensors, that are Example of control devices
stimulated by temperature,
pressure, light, motion, etc.
and convert this to voltage or
current signals to be read by
the computer.
Types of Microcontrollers

INTERNAL
BUS MEMORY INSTRUCTIO ARCHITECTUR
Microcontrollers N SET E
can be WIDTH
classified on the
basis of internal
bus width,
architecture,
memory and
instruction set.
FAMILY
Types of Microcontrollers

THE 8-BIT MICROCONTROLLER

When the ALU performs arithmetic and logical


ON operations on a byte (8-bits) at an instruction,
S ED NAL the microcontroller is an 8-bit microcontroller.
BA TER IDTH The internal bus width of 8-bit microcontroller
IN S W is of 8-bit. Examples of 8-bit microcontrollers
BU are Intel 8051 family and Motorola MC68HC11
family.
THE 16-BIT MICROCONTROLLER

When the ALU performs arithmetic and logical operations


on a word (16-bits) at an instruction, the microcontroller is
an 16-bit microcontroller. The internal bus width of 16-bit
microcontroller is of 16-bit. Examples of 16-bit
microcontrollers are Intel 8096 family and Motorola
MC68HC12 and MC68332 families. The performance and
computing capability of 16 bit microcontrollers are
enhanced with greater precision as compared to the 8-bit
microcontrollers.
Types of Microcontrollers

THE 32-BIT MICROCONTROLLER


ON
S ED NAL
When the ALU performs arithmetic and
BA TER IDTH
IN S W logical operations on a double word (32-
bits) at an instruction, the microcontroller is
BU
an 32-bit microcontroller. The internal bus
width of 32-bit microcontroller is of 32-bit.

Examples of 32-bit microcontrollers are


Intel 80960 family and Motorola M683xx and
Intel/Atmel 251 family. The performance and
computing capability of 32 bit
microcontrollers are enhanced with greater
precision as compared to the 16-bit
microcontrollers.
Types of Microcontrollers

EMBEDDED MICROCONTROLLERS
When an embedded system has an microcontroller unit that has
ON all the functional blocks (including program as well as data
S ED RY memory) available on a chip is called an embedded
BA EMO microcontroller. For example, 8051 having Program & Data
M Memory, I/O Ports, Serial Communication, Counters and Timers
and Interrupt Control logic on the chip is an embedded
microcontroller.

EXTERNAL MEMORY MICROCONTROLLERS


When an embedded system has an microcontroller unit that has not all the
functional blocks available on a chip is called an external memory
microcontroller. In external memory microcontroller, all or part of the
memory units are externally interfaced using an interfacing circuit called
the glue circuit. For example, 8031 has no program memory on the chip is
an external memory microcontroller.
Types of Microcontrollers

CISC (COMPLEX INSTRUCTION SET COMPUTER)


ARCHITECTURE MICROCONTROLLERS
ON N
S ED TIO When an microcontroller has an instruction set that supports
C
BA RU T many addressing modes for the arithmetic and logical
N ST SE instructions, data transfer and memory accesses instructions,
I the microcontroller is said to be of CISC architecture.

The typical CISC microcontroller has well over 80 instructions,


many of them very powerful and very specialized for specific
control tasks. It is quite common for the instructions to all
behave quite differently. Some might only operate on certain
address spaces or registers, and others might only recognize
certain addressing modes.

The advantages of the CISC architecture are that many of the


instructions are macrolike, allowing the programmer to use
one instruction in place of many simpler instructions.
Types of Microcontrollers

ON N
S ED TIO
C
BA RU T RISC (REDUCED INSTRUCTION SET COMPUTER)
N ST SE ARCHITECTURE MICROCONTROLLERS
I The industry trend for microprocessor design is for Reduced
Instruction Set Computers (RISC) designs. When a
microcontroller has an instruction set that supports fewer
addressing modes for the arithmetic and logical instructions,
and for data transfer instructions, the microcontroller is said
to be of RISC architecture.

The benefits of RISC design simplicity are a smaller chip,


smaller pin count, and very low power consumption.
Types of Microcontrollers

Harvard Von-Neumann (Princeton)


D ON
E R
BAS TECTU
• Harvard Architecture refers to a • A Von-Neumann Machine, in
memory structure where the contrast to the Harvard
R C HI processor is connected to two Architecture provides one data
A E different memory banks via two path (bus) for both instruction and
sets of buses data
• This is to provide the processor • As a result, the CPU can either be
with two distinct data paths, one fetching an instruction from
for instruction and one for data memory, or read/writing data to it
• Through this scheme, the CPU • Other than less complexity of
can read both an instruction and hardware, it allows for using a
data from the respective memory single, sequential memory.
banks at the same time • The Von-Neuman architecture’s
These • This inherent independence main advantage is that it simplifies
architectures increases the throughput of the the microcontroller design
machine by enabling it to always because only one memory is
differ in the pre-fetch the next instruction accessed.
way data and • The Harvard Architecture executes
programs are instructions in fewer instruction
stored and cycles than the Von-Neumann
architecture
accessed
• The cost of such a system is
complexity in hardware
• Commonly used in DSPs
Types of Microcontrollers

D ON Harvard
E R
BAS TECTU and
C HI
AR E von-Neumann Architecture

You might also like