Professional Documents
Culture Documents
Chapter 5
Chapter 5
Chapter 5
INTRODUCTION TO MICROCONTROLLER
MFO
Chapter 5: Micro-controller Systems and Applications
1
At the end of this chapter, the
students should be able to.…
Microprocessor
MEC523 – Applied Electronics and
2
Microprocessors and Microcontrollers
Microprocessor
MEC523 – Applied Electronics and
Microprocessor
✓ To control some
process
✓ Built from logic ✓ Smaller size – fit onto ✓ Miniaturization – onto one chip
components small cct board ✓ Contains CPU, Memory, I/O,
✓ Large, heavy boxes ✓ Eg: Zilog Z80, Intel 8088, timers and interrupt (Fig. 1.2)
Motorola 6809, etc.
Controller ✓ ~ a CPU (Fig. 1.1)
Microcontroller
3
Microprocessors and Microcontrollers
4
MEC523 – Applied Electronics and
MFO
Microprocessor
Microprocessors and Microcontrollers
Microprocessor
MEC523 – Applied Electronics and
MFO
5
Difference of
Microcontroller and Microprocessor
Microprocessor
MEC523 – Applied Electronics and
MFO
6
Difference of
Microcontroller and Microprocessor
Microprocessor
MEC523 – Applied Electronics and
MFO
7
Terminology used for microcontrollers
8
MEC523 – Applied Electronics and
MFO
Microprocessor
Terminology used for microcontrollers
Microprocessor
MEC523 – Applied Electronics and
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 Unit) ONE machine cycle = ‘X’ clock cycles (‘X’
depends on the particular
✓Brain of the computer instruction being executed).
MFO
10
Terminology used for microcontrollers
Microprocessor
MEC523 – Applied Electronics and
MFO
11
Terminology used for microcontrollers
Microprocessor
MEC523 – Applied Electronics and
• 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.
MFO • WRITE OPERATIONS put data from CPU on the data bus and store it in the
location specified.
12
Terminology used for microcontrollers
Microprocessor
MEC523 – Applied Electronics and
13
Terminology used for microcontrollers
Microprocessor
MEC523 – Applied Electronics and
CONTROL/MONITOR
(INPUT/OUTPUT) DEVICES
14
Types of Microcontrollers
Microprocessor
MEC523 – Applied Electronics and
INTERNAL INSTRUCTION
MEMORY ARCHITECTURE
Microcontrollers BUS WIDTH SET
can be classified on
the basis of
internal bus width,
architecture,
memory and
instruction set
FAMILY
MFO
15
Types of Microcontrollers
Microprocessor
MEC523 – Applied Electronics and
16
Types of Microcontrollers
Microprocessor
MEC523 – Applied Electronics and
17
Types of Microcontrollers
Microprocessor
MEC523 – Applied Electronics and
EMBEDDED MICROCONTROLLERS
When an embedded system has an microcontroller unit that has all
the functional blocks (including program as well as data memory)
available on a chip is called an embedded microcontroller. For
example, 8051 having Program & Data Memory, I/O Ports, Serial
Communication, Counters and Timers and Interrupt Control logic on
the chip is an embedded microcontroller.
18
Types of Microcontrollers
Microprocessor
MEC523 – Applied Electronics and
19
Types of Microcontrollers
Microprocessor
MEC523 – Applied Electronics and
MFO
20
Types of Microcontrollers
Microprocessor
MEC523 – Applied Electronics and
Harvard
Microprocessor
MEC523 – Applied Electronics and
and
von-Neumann Architecture
MFO
22
23
Design Operation of Memory
MEC523 – Applied Electronics and
MFO
Microprocessor
The Design and Operation of Memory
Microprocessor
MEC523 – Applied Electronics and
MFO
24
Accessing Information in Memory
Microprocessor
MEC523 – Applied Electronics and
MFO
25
The Basic Memory Element
Microprocessor
MEC523 – Applied Electronics and
Enable
EN
MFO
26
The Basic Memory Element
Microprocessor
MEC523 – Applied Electronics and
WR RD
Enable
EN
MFO
27
The Basic Memory Element
Microprocessor
MEC523 – Applied Electronics and
MFO
28
A Memory “Register”
Microprocessor
MEC523 – Applied Electronics and
WR
D D D D
Q Q Q Q
EN EN EN EN
EN
RD O0 O1 O2 O3
MFO
29
A group of memory registers
D0 D1 D2 D3
Microprocessor
MEC523 – Applied Electronics and
o o o o
WR
D Q D Q D Q D Q
EN EN EN EN
✓ Expanding on this D Q D Q D Q D Q
EN EN EN EN
D Q D Q D Q D Q
EN EN EN EN
o o o o
RD
MFO
D0 D1 D2 D3
30
A group of Memory Registers
Microprocessor
MEC523 – Applied Electronics and
R
EN Memory Reg. 0
EN
0 Memory Reg. 1
EN
1 Memory Reg. 2
EN
2 Memory Reg. 3
3
Output Buffers
RD
O O O O
MFO
0 1 2 3
31
The Design of a Memory Chip
Microprocessor
MEC523 – Applied Electronics and
MFO
32
The Enable Inputs
Microprocessor
MEC523 – Applied Electronics and
MFO
33
The Design of a Memory Chip
Microprocessor
MEC523 – Applied Electronics and
✓ So, the previous diagram would now look like the following:
I I I I
0 1 2 3
W Input Buffers
R
A D Memory Reg. 0
A1 d e Memory Reg. 1
d c
Memory Reg. 2
A0 r o
e d Memory Reg. 3
s e
RD s r Output Buffers
O O O O
MFO
0 1 2 3
34
The Design of a Memory Chip
Microprocessor
MEC523 – Applied Electronics and
✓ Since we have tri-state buffers on both the inputs and outputs of the flip
flops, we can use one set of pins only.
➢ The chip would now look like this:
W Input Buffers
R
A D Memory Reg. 0 D0 D0
A1 d e Memory Reg. 1 A1
D1 D1
d c
Memory Reg. 2
A0 r o D2 A0 D2
e d Memory Reg. 3
D3 D3
s e
RD s r Output Buffers
MFO RD W
R
35
Tutorial
36
MEC523 – Applied Electronics and
MFO
Microprocessor
Solution:
37
MEC523 – Applied Electronics and
MFO
Microprocessor
Thank you for the attention !
Microprocessor
MEC523 – Applied Electronics and
MFO
Acknowledgement:
Thank you to Fadzliana Saad and Norhazlin Khairudin from FKE for the teaching materials
38