0% found this document useful (0 votes)
5 views33 pages

Chapter-1A: Introduction To Microcontroller

This document provides an introduction to microcontrollers, detailing their history, architecture, and comparison with microprocessors. It covers the basic structure of computer systems, types of memories, and the evolution of microcontrollers since the 1970s. Key differences between microcontrollers and microprocessors are highlighted, along with the classification of computer architectures and memory types.

Uploaded by

nasa60000
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views33 pages

Chapter-1A: Introduction To Microcontroller

This document provides an introduction to microcontrollers, detailing their history, architecture, and comparison with microprocessors. It covers the basic structure of computer systems, types of memories, and the evolution of microcontrollers since the 1970s. Key differences between microcontrollers and microprocessors are highlighted, along with the classification of computer architectures and memory types.

Uploaded by

nasa60000
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 33

CHAPTER-1A

INTRODUCTION TO MICROCONTROLLER

TECHNICAL AND VOCATIONAL TRAINING INSTITUTE


Department of Electrical electronics technology

Fundamentals of
microcontroller/microprocessor
EETe 3032

1
By Zemenu T. /2022
Outlines

1.Introduction
2.A Brief History of Microprocessor and microcontroller
3.Microprocessors and Microcontroller comparison
4.Structure of a basic computer system,
5. The microcontroller architecture
6. CPU families used in microcontrollers,
7.Types of Memories
8.Memory organization, Registers and Clock concept

2
Introduction
Circumstances that we find ourselves in today in the field of microcontrollers had
their beginnings in the development of technology of integrated circuits. This
development has made it possible to store hundreds of thousands of transistors into
one chip. That was a prerequisite for production of microprocessors, and the first
computers were made by adding external peripherals such as memory, input-output
lines, timers and other. Further increasing of the volume of the package resulted in
creation of integrated circuits. These integrated circuits contained both processor
and peripherals. That is how the first chip containing a microcomputer, or what
would later be known as a microcontroller came about.

3
What is a Microcontroller?
A Microcontroller is a VLSI IC that contains a CPU (Processor) along with some other
peripherals like Memory (RAM and ROM), I/O Ports, Timers/Counters, Communication
Interface, ADC, etc. The following image shows the basic components of a
Microcontroller. As all the components (and a few other components) are integrated on
a single chip (Integrated Circuit – IC), a Microcontroller can be considered as a
Microcomputer (or a Computer on – chip).

4
CPU (Central Processing Unit)
It is the heart of the Microcontroller that mainly comprises of an Arithmetic Logic Unit
(ALU) and a Control Unit (CU) and other important components. The CPU is the
primary device in communicating with peripheral devices like Memory, Input and
Output.

ALU or Arithmetic Logic Unit, as the name suggests, performs the Arithmetical and
Logical Operations. CU or Control Unit is responsible for timing of the communication
process between the CPU and its peripherals
5
Microprocessor
Microprocessor is the brain of computer, which does all the work. It is a computer
processor that incorporates all the functions of CPU (Central Processing Unit) on a
single IC (Integrated Circuit) or at the most a few ICs. Microprocessors were first
introduced in early 1970s. 4004 was the first general purpose microprocessor used by
Intel in building personal computers. Arrival of low cost general purpose microprocessors
has been instrumental in development of modern society the way it has.

6
Microcontrollers Vs Microprocessors

1. A microprocessor requires an external memory for program/data storage.


Instruction execution requires movement of data from the external memory to the
microprocessor or vice versa. Usually, microprocessors have good computing power
and they have higher clock speed to facilitate faster computation.
2. A microcontroller has required on-chip memory with associated peripherals. A
microcontroller can be thought of a microprocessor with inbuilt peripherals.
A microcontroller does not require much additional interfacing ICs for operation and it
functions as a stand alone system. The operation of a microcontroller is multipurpose.
Microcontrollers are also called embedded controllers. A microcontroller clock speed is
limited only to a few tens of MHz Microcontrollers are numerous and many of them are
7
application specific.
Microcontrollers Vs Microprocessors (Cont’d)

In order to make Microprocessor work or build a system around it, we need to interface
the peripherals separately.

8
The following table highlights the differences between a microprocessor and a
microcontroller −
Microprocessor Microcontroller
Microprocessors are multitasking in nature. Can Single task oriented. For example, a washing
perform multiple tasks at a time. For example, on machine is designed for washing clothes only.
computer we can play music while writing text in text
editor.
RAM, ROM, I/O Ports, and Timers can be added RAM, ROM, I/O Ports, and Timers cannot be added
externally and can vary in numbers. externally. These components are to be embedded
together on a chip and are fixed in numbers.

Designers can decide the number of memory or I/O Fixed number for memory or I/O makes a
ports needed. microcontroller ideal for a limited but specific task.

External support of external memory and I/O ports Microcontrollers are lightweight and cheaper than a
makes a microprocessor-based system heavier and microprocessor.
costlier.
External devices require more space and their power A microcontroller-based system consumes less
9
consumption is higher. power and takes less space.
Basic Structure of Computer
A computer system is basically a machine that simplifies complicated tasks. It should
maximize performance and reduce costs as well as power consumption. All types of
computers follow a same basic logical structure and perform the following five basic
operations for converting raw input data into information useful to their users.
Following diagram shows the basic structure of Computer:

Input Unit
This unit contains devices with the help of which we enter data into computer. This unit
makes link between user and computer. The input devices translate the information into
10
the form understandable by computer.
CPU (Central Processing Unit)
CPU is considered as the brain of the computer. CPU performs all types of data
processing operations. It stores data, intermediate results and instructions(program). It
controls the operation of all parts of computer.
CPU itself has following three components
•ALU(Arithmetic Logic Unit)
•Memory Unit
•Control Unit

Output Unit
Output unit consists of devices with the help of which we get the information from
computer. This unit is a link between computer and users. Output devices translate the
11
computer’s output into the form understandable by users.
S.No. Operation Description
The process of entering data and instructions into the
1 Take Input
computer system
Saving data and instructions so that they are available for
2 Store Data
processing as and when required.
Performing arithmetic, and logical operations on data in
3 Processing Data
order to convert them into useful information.
The process of producing useful information or results for
4 Output Information
the user, such as a printed report or visual display.
Control the Directs the manner and sequence in which all of the
5
workflow above operations are performed.

12
Development/Classification of microcontrollers

Microcontrollers have gone through a silent evolution (invisible). The


evolution can be rightly termed as silent as the impact or application of a
microcontroller is not well known to a common user, although
microcontroller technology has undergone significant change since early
1970's. Development of some popular microcontrollers is given as follows.

13
Development/Classification of microcontrollers (Contd.)

Intel 4004 4 bit (2300 PMOS trans, 108 kHz) 1971

Intel 8048 8 bit 1976


Intel 8031 8 bit (ROM-less) .
Intel 8051 8 bit (Mask ROM) 1981
Microchip PIC16C64 8 bit 1985
Motorola 68HC11 8 bit (on chip ADC) .
Intel 80C196 16 bit 1982

Atmel AT89C51 8 bit (Flash memory) .

Microchip PIC 16F877 8 bit (Flash memory + ADC) 14


.
Basic functions of parts of microcontroller system

• Input – accepts coded information from human operators, from


electromechanical devices (such as keyboards), or from other digital medium via
digital communication lines.
•The information received is either stored in the memory or immediately used by
the arithmetic and logic unit (ALU) to perform the desired operations.
•The results are sent back out through the output medium.
•All actions are coordinated through the control unit.

15
Microcontroller basics
Information organization
- Categorized as either instructions or data
-Instructions (or machine instructions) are explicit commands that
• Govern the transfer of information within a microcontroller as well as between
the microcontroller and its I/O devices.
•Specify the arithmetic and logic operations to be performed.
•Programs
- A list of instructions that performs a task is called a program.
- Usually the program is stored in memory.
- The program fetches the instructions from memory, one after another, and performs
the desired operations.
- The microcontroller is completely controlled by the stored program, except for
possible interruption by an operator or by I/O devices connected to the machine.
- Data are numbers and encoded characters that are used as operands by the
instructions.

16
Internal Structure of a Microcontroller

At times, a microcontroller can have external memory also (if there is no internal
memory or external memory interface is required). Early microcontrollers were
manufactured using bipolar or NMOS technologies. Most modern microcontrollers are
manufactured with CMOS technology, which leads to reduction in size and power loss.
Current drawn by the IC is also reduced considerably from 10mA to a few micro
Amperes in sleep mode (for a microcontroller running typically at a clock speed of
20MHz).

17
Internal Structure of a Microcontroller (Cont’d)

18
Bus Structure

Bus - a group of parallel wires that transfer information from one part of
the computer to another.
Control Bus
synchronizes the actions of all of the devices attached to the system bus.
Address Bus
passes the addresses of instructions and data between the CPU and memory
(or I/O).
Data Bus
transfers instructions and data between the CPU and memory (or I/O).

19
Block diagram of a microcontroller system

20
21
Types of Computer Architecture

Basically, Microprocessors or Microcontrollers are classified based on


the two types of Computer Architecture: Von Neumann Architecture and
Harvard Architecture

22
Von Neumann Architecture
Von Neumann Architecture or Princeton Architecture is a Computer Architecture, where
the Program i.e. the Instructions and the Data are stored in a single memory.
Since the Instruction Memory and the Data Memory are the same, the Processor or CPU
cannot access both Instructions and Data at the same time as they use a single bus.
This type of architecture has severe limitations to the performance of the system as it
creates a bottleneck while accessing the memory.

23
Harvard Architecture
Harvard Architecture, in contrast to Von Neumann Architecture, uses separate
memory for Instruction (Program) and Data. Since the Instruction Memory and Data
Memory are separate in a Harvard Architecture, their signal paths i.e. buses are also
different and hence, the CPU can access both Instructions and Data at the same time.
Almost all Microcontrollers, including 8051 Microcontroller implement Harvard
Architecture.

24
CISC and RISC
CISC is a Complex Instruction Set Computer. It is a computer that can address a large number of
instructions. In the early 1980s, computer designers recommended that computers should use fewer
instructions with simple constructs so that they can be executed much faster within the CPU without
having to use memory. Such computers are classified as Reduced Instruction Set Computer or RISC.
CISC vs RISC
CISC RISC

Larger set of instructions. Easy to program Smaller set of Instructions. Difficult to


program.
Simpler design of compiler, considering Complex design of compiler.
larger set of instructions.
Many addressing modes causing complex Few addressing modes, fix instruction
instruction formats. format.
Higher clock cycles per second. Low clock cycle per second.
25
Memory Classification

Expensive Cheap Onetime programmable


Fast/ Slow
Electronically Erasable
PROM
Memory Classification (Cont’d)

In a microcontroller, two types of memory are found. They are, program


memory and data memory respectively. Program memory is also
known as 'control store' and 'firm ware'. It is non-volatile i.e, the memory
content is not lost when the power goes off. Non-volatile memory is also
called Read Only Memory (ROM). There are various types of ROM.

27
Program Memory Types

1. Mask ROM: Some microcontrollers with ROM are programmed while


they are still in the factory. This ROM is called Mask ROM. Since the
microcontrollers with Mask ROM are used for specific application, there is
no need to reprogram them.
2. Reprogrammable program memory (or) Erasable PROM
(EPROM): Microcontrollers with EPROM were introduced in late 1970's.
These devices are electrically programmable but are erased with UV
radiation. Usually, these versions of micro controllers are expensive.
28
Program Memory Types (Cont’d)

3. OTP EPROM: One time programmable (OTP) EPROM based microcontrollers do not
have any glass window for UV erasing. These can be programmed only once. This type
of packaging results in microcontroller that have the cost 10% of the microcontrollers
with UV erase facility (i.e., 1/10th cost).

4. EEPROM: (Electrically Erasable Programmable ROM): This is similar to EPROM but


the float charge can be removed electrically.

5. FLASH (EEPROM Memory): FLASH memory was introduced by INTEL in late


1980's. This memory is similar to EEPROM but the cells in a FLASH memory are
bussed so that they can be erased in a few clock cycles. Hence the reprogramming is
faster.
29
Organization of Data Memory
DATA Memory
Data memory can be classified into the following categories
• Bits
• Registers
• Variable RAM
• Program counter stack
Microcontroller can have ability to perform manipulation of individual bits in certain
registers(bit manipulation). This is a unique feature of a microcontroller, not available in
a microprocessor.
Eight bits make a byte. Memory bytes are known as file registers.
Registers are some special RAM locations that can be accessed by the processor very
30
easily.
Organization of Data Memory (Contd.)

I/O Registers:

In addition to the Data memory, some special purpose registers are


required that are used in input/output and control operations. These
registers are called I/O registers. These are important for microcontroller
peripheral interface and control applications.

31
Organization of Data Memory (Contd.)
Hardware interface registers (I/O Space)

As we already know a microcontroller has some embedded peripherals


and I/O devices. The data transfer to these devices takes place through
I/O registers. In a microprocessor, input /output (I/O) devices are
externally interfaced and are mapped either to memory address (memory
mapped I/O) or a separate I/O address space (I/O mapped I/O).

32
33

You might also like