100% found this document useful (1 vote)
136 views

MUCLecture 2022 41025606

The document provides an introduction to microcontrollers, their components, and types. It discusses the differences between microprocessors and microcontrollers, and describes the typical components of a microcontroller including memory types, CPU, control unit, ALU, registers, clock, I/O ports, and bus. It also outlines different ways microcontrollers can be classified such as by bus width, memory, instruction set, architecture, and manufacturer.
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
100% found this document useful (1 vote)
136 views

MUCLecture 2022 41025606

The document provides an introduction to microcontrollers, their components, and types. It discusses the differences between microprocessors and microcontrollers, and describes the typical components of a microcontroller including memory types, CPU, control unit, ALU, registers, clock, I/O ports, and bus. It also outlines different ways microcontrollers can be classified such as by bus width, memory, instruction set, architecture, and manufacturer.
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/ 10

Microcontroller Design Dr.

Shayma Akram Yousif

Lecture 1:
Introduction to Microcontroller

Embedded Systems
An embedded system is a smart system that consists of both hardware and
software designed to perform a set of tasks.

Example of embedded system

Mobile phones. These consist of many embedded systems, including GUI


software and hardware, operating systems (OSes), cameras, microphones,
and USB (Universal Serial Bus) I/O (input/output) modules.

Microprocessor
Microprocessors are the core of any modern computer: they are single chip
processing units responsible for computing each operation stored in the
program.

Microcontroller
A microcontroller is a small and low-cost microcomputer, which is designed
to perform the specific tasks of embedded systems.

Microprocessors are different than microcontrollers in their design.


Microprocessors have the only CPU inside them and no in-memory support
while Microcontrollers, on the other side, has CPU, RAM, ROM and other
peripherals which are all embedded on the chip.

Note:
We use the word “peripheral” to describe the hardware modules that
help a microcontroller to interact with the external system.

1
Microcontroller Design Dr. Shayma Akram Yousif

2
Microcontroller Design Dr. Shayma Akram Yousif

Microcontroller Components

Types of Memory
Three types of memories are commonly used in modern microcontrollers.
1. Random Access Memory (RAM)
2. Electrically Erasable Programmable Read-Only Memory
(EEPROM)
3. Flash Memory

Random Access Memory (RAM)


- It is a volatile memory, which means it can only be accessed when
the system is powered-up. As the system power shuts down, so
do the contents inside the RAM.

- It has a faster access time, but this is also expensive when


compared with the other ones. It is mainly used to store temporary
data, variables, and constants during the execution of user
instructions.

Electrically Erasable Programmable Read-Only Memory (EEPROM)


- It is a non-volatile memory, which means that contents in such a
memory remain intact even when the power is removed.

- The main use of EEPROM in the microcontroller is to store user


instructions and data. The microcontroller then accesses the
instructions one-by-one and sequentially executes them.

Flash Memory
- Flash Memory is also non-volatile memory.

3
Microcontroller Design Dr. Shayma Akram Yousif

- Unlike EEPROM, it can only program a whole sector or block of


bytes.

Some microcontroller manufacturers use either Flash or EEPROM, while


others use both to provide more flexibility to the end-user.

Central Processing Unit (CPU)


CPU is a component of the microcontroller that fetches instructions from
the memory, decodes them, and then executes them.

Control Unit

a control unit controls the operations of all parts of the computer but it
does not carry out any data processing operations. Some main
functions of the control unit are listed below:

• Controlling of data and transfer of data and instructions is done by


the control unit among other parts of the computer.
• The control unit is responsible for managing all the units of the
computer.
• The main task of the control unit is to obtain the instructions or data
which is input from the memory unit, interprets them, and then
directs the operation of the computer according to that.
• The control unit is responsible for communication with input and
output devices for the transfer of data or results from memory.
• The control unit is not responsible for the processing of data or
storing data.

ALU (Arithmetic Logic Unit)

ALU (Arithmetic Logic Unit) is responsible for performing arithmetic and


logical functions or operations. It consists of two subsections, which are:

1. Arithmetic Section
2. Logic Section

Registers

▪ Registers are temporary storage areas within a CPU. They are used
to store the information about the program flow, program status,
instruction results, and the hardware configuration.

▪ They are much faster to access than the memory.

▪ This is the single main reason why CPU prefers registers over the
memory for operations involving immediate data access.

4
Microcontroller Design Dr. Shayma Akram Yousif

Clock

You need a Clock Signal which can synchronize each activity of the CPU
with a rising or falling edge. Moreover, the frequency of the clock
signal will specify the execution period for each instruction. Higher the
frequency, lower the execution time.

I/O Ports

• Input-Output ports in microcontroller to read dynamic user-


inputs, or to control external devices.

• I/O Ports provide the user input data from input devices to the CPU.

• I/O Ports output the desired information to the user by interfacing


with the LCD or LED display.

Each port in a microcontroller is programmable to be either


input/output. This provides a user with the flexibility to program the I/O
ports as per the application needs.

Bus
▪ The bus will establish a communication link between different
components.
▪ There are three kinds of buses which are mostly used in
microcontrollers:

• Instruction/Data Bus: This bus helps transfer instructions/data


back and forth into CPU and the memory
• Address Bus: This bus specifies the address where the desired
instruction/data are located inside the memory
• Control Bus: This bus specifies whether the instructions/data
are to be written or be fetched from the memory

Types of Microcontroller
There are different types of Microcontrollers available and are classified
based on Bus-width, Memory, Insutruction Set, Architecture, and
Manufacturer.

5
Microcontroller Design Dr. Shayma Akram Yousif

Microcontroller Types based on Bus-Width

Microcontrollers come in 8 bit, 16 bit, 32 bit and 64 bit.

▪ In an 8-bit microcontroller, the point when the internal bus is 8-bit then
the ALU performs the arithmetic and logic operations.
▪ The 16-bit microcontroller performs greater precision and
performance as compared to the 8-bit.
▪ The 32-bit microcontroller uses the 32-bit instructions to perform the
arithmetic and logic operations. These are used in automatically
controlled devices including implantable medical devices, engine
control systems, office machines, appliances, and other types of
embedded systems.

Microcontroller Types based on Memory

Based on memory, microcontrollers are divided into two types: external


memory microcontrollers and embedded memory microcontrollers.

• External Memory
In the case of external memory microcontrollers, memory is not
interfaced within the microcontroller. Rather, the user needs
to connect an external memory to store instructions/data.
• Embedded Memory
For embedded memory microcontrollers, memory
is embedded inside the microcontroller.

Microcontroller Types based on the Instruction set

6
Microcontroller Design Dr. Shayma Akram Yousif

Based on instruction set, microcontrollers are classified into two types i.e
CISC-CISC and RISC-RISC.

• complex instruction set computer (CISC): CISC computers have


small programs. It has a huge number of compound instructions, which
takes a long time to perform.

• reduced instruction set computer (RISC): RISC is a computer that


only uses simple commands that can be divided into several instructions
that achieve low-level operation within a single CLK cycle.

RISC is an alternative to the CISC architecture and is often considered the


most efficient CPU architecture technology available today.

Microcontroller Types based on the Architecture

Harvard Architecture Microcontroller:

The Harvard architecture based microcontroller has physically separate


memory storage for program code (instructions) and the data. Thus, they
have separate bus lines and can be accessed both at the same time.
Therefore, the Harvard architecture based microcontroller can complete
instruction in one machine cycle.

Von Neumann (or Princeton) Architecture Microcontroller:


Von Neumann or Princeton architecture suggests using a single memory for
both the program and data storage. It is the most used architecture in all
computers, desktop and laptops to date.

7
Microcontroller Design Dr. Shayma Akram Yousif

There is only one bus required for accessing data and fetching instructions.
Thus, both operations cannot be done at the same time and they must be
scheduled. This is why von Neumann architecture based microcontroller
takes two machine cycles to complete an instruction. Since it uses a single
bus system, its design is simple and production is very low compared to
Harvard architecture.

8
Microcontroller Design Dr. Shayma Akram Yousif

Microcontroller Types based on the Manufacture

8051 Microcontroller

PIC ( Programmable Interface Controllers) Microcontroller

9
Microcontroller Design Dr. Shayma Akram Yousif

AVR Microcontroller

It is an electronic chip which is manufactured by Atmel. This microcontroller


is the advanced version of a microcontroller. This microcontroller is used
for high-speed signal processing operation which is connected inside an
embedded system.

Analog-to-Digital Converter (ADC)

ADC takes Analog inputs and converts them to digital values. These digital
values are then fed into CPU for further processing.

Digital-to-Analog Converter (DAC)


Digital-to-Analog Converter (DAC) converts digital pulses into Analog
signals.

Microcontroller Applications

• Baby Monitors
• Fire Detection
• Internet of Things
• Home Automation
• Light Sensing
• LED Control
• Low-Cost Wearables
• Medical Equipment
• Sub-Marines
• Ships
• Aerospace System
• and many more…

10

You might also like