0% found this document useful (0 votes)
9 views48 pages

Overview of Embedded Microcontrollers

Chapter Two discusses embedded microcontrollers, outlining their core components, including memory, input/output devices, communication interfaces, and firmware. It distinguishes between microprocessors and microcontrollers, highlighting their respective architectures and applications, as well as the importance of sensors and actuators in embedded systems. The chapter also covers various processor families, including RISC and CISC, and compares Harvard and Von-Neumann architectures.

Uploaded by

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

Overview of Embedded Microcontrollers

Chapter Two discusses embedded microcontrollers, outlining their core components, including memory, input/output devices, communication interfaces, and firmware. It distinguishes between microprocessors and microcontrollers, highlighting their respective architectures and applications, as well as the importance of sensors and actuators in embedded systems. The chapter also covers various processor families, including RISC and CISC, and compares Harvard and Von-Neumann architectures.

Uploaded by

aminmohammed3030
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

Chapter Two

Embedded Microcontrollers

12/31/2025 1
2
Outline

Core of embedded systems

Memory

Input output device of ES

Communication interface

Embedded firmware
Embedded Microcontroller

CPU families used in Microcontrollers

Microcontroller modules
12/31/2025 2
3
ELEMENTS OF AN EMBEDDED
SYSYTEM

e FIRM-
MEMORY WARE

I/P PORTS SYSTEM CORE O/P PORTS

OTHER
DEVICES

12/31/2025 3
Cont’d
• Embedded hardware/software systems are basically designed:
 To regulate a physical variable
 To manipulate the state of some devices by sending
some signals to the actuators
 To manipulate the state of devices connected to the O/P
port system, in response to the input signal provided by
the end users or sensors which are connected to the
input ports.
•Hence the embedded systems can be viewed as a reactive
system.

• Keyboards, push button, switches, etc. are example of common


user
interface input devices.

• LED’s, liquid crystal displays, piezzo electrical buzzers,


etc.
12/31/2025
are examples of common user interface output devices4
Cont’d
5
• Some embedded systems do not require any manual
interventions for theeir operations.
• The memory of the system is responsible for holding the control
algorithm and other important configuration details.
• An embedded system without the control algorithm
implemented memory, i.e.. Having all the peripherals but not
capable of making decisions depending on the situational as
well as real world changes.
• In a controller based embedded system, the controller may
contain internal memory for storing control algorithm.
• Such controllers are called controllers with on-chip ROM,
e.g. PIC18fxxx, Atmel AT89C51.

12/31/2025 5
6
CORE OF THE EMBEDDED SYSTEM
• Embedded systems are domain and application specific and are
built arounde a central core.
• The core of the embedded system falls into any of the
following categories.
1. General purpose and Domain Specific Processors
i. Microprocessors
ii. Microcontrollers
iii. Digital Signal Processors
2. Application Specific Integrated Circuits.(ASIC’s)
3. Programmable logic devices(PLD’s)
4. Commercial off-the-shelf components(COTs)

12/31/2025 6
7 GENERAL PURPOSE AND DOMAIN
SPECIFIC PROCESSORS..
• Almost 80% of the eembedded systems are processor/
controller based.
• The processor may be microprocessor or a microcontroller or
digital signal processor, depending on the domain and
application

12/31/2025 7
MICROPROCESSOR
8
• A microprocessor is a silicon chip representing a central
processing unit.
• A microprocessor is a dependent unit and it requires the
combination of other hardware like memory, timer unit,
interrupt controller, etc. for proper functioning.
• DEVELOPERS OF MICROPROCESSORS.
• Intel – Intel 4004 – November 1971(4-bit).
• Intel – Intel 4040.
• Intel – Intel 8008 – April 1972.
• Intel – Intel 8080 – April 1974(8-bit).
• Motorola – Motorola 6800.
• Architectures used for processor design are Harvard or Von-
Neumann.
• RISC and CISC are the two common Instruction Set
Architectures (ISA) available for processor design.

12/31/2025 8
GENERAL PURPOSE
PROCESSOR
9 vs.
APPLICATION SPECIFIC INSTRUCTION SET PROCESSOR
• A general processor is a processor designed for
e
general computational tasks.
• Application specific instruction set processors(ASIPs)are
processors with architecture and instruction set optimized
to specific-domain/application requirements like network
processing, automotive, control applications, etc.
• The need for an ASIP arises when the traditional
general purpose processor are unable to meet the
increasing application needs.
• Most of the embedded systems are built around
application specific instruction set processor.
12/31/2025 9
10
MICROCONTROLLERS

• A microcontroller is a ehighly integrated chip that contains a


CPU, RAM, special and general purpose register arrays, on chip
ROM/FLASH memory for program storage , timer and interrupt
control units and dedicated I/O ports.

• Some embedded system application require only 8 bit


controllers whereas some requiring superior performance
and computational needs demand 16/32 bit controllers.

• The instruction set of a microcontroller can be RISC or CISC.

12/31/2025 10
Microprocessor
11
v/s Microcontroller
Microprocessor Microcontroller
• A silicon chip representing
e a • A microcontroller is a highly
central processing unit integrated chip that
(CPU),which is capable of contains CPU , RAM, special
performing arithmetic as and general purpose
well as logical operations register arrays, on-chip
according to a pre-defined ROM/FLASH memory for
set of instructions. program storage, timer and
interrupt control units and
• It is a dependent unit. It dedicated I/O ports.
requires the combination
of other chips like timers, • It is a self-contained unit
program etc. for and it doesn’t require
functioning. external interrupt
controller, timer, UART, etc.
• Most of the time
for functioning.
general purpose in
design and operation. • Mostly application-oriented
12/31/2025 or domain-specific 11
Microprocessor
12
v/s Microcontroller
Microprocessor Microcontroller
• Doesn’t contains a built ine I/O • Most of the processors
port. The I/O port functionality contain multiple built-in I/O
needs to be implemented with ports which can be operated
the help of external as a single 8 or 16 or 32 bit
programmable peripheral port or as individual port pins.
interface chips like 8255. • Targeted for embedded market
• Targeted for high-end where performance is not
market where performance important.
is important. • It saves more power.
• It saves less power as
compared to
microcontrollers.

12/31/2025 12
13 Microprocessor v/s Microcontroller

12/31/2025 13
Digital Signal Processor (DSP)
14
• DSP are powerful special purpose 8/16/32 bit microprocessor
designed to meet the computational demands and power
e
constraints of today’s embedded audio, video and communication
applications.
• DSP are two to three times faster than general purpose
microprocessors in signal processing applications. This is
because of the architectural difference the two.
• DSPs implement algorithms in hardware which speeds up the
execution whereas general purpose processor implement the
algorithm in software and the speed of execution depends
primarily on the clock for the processors.
• It incorporated many specialized arithmetic units and each of
them operates simultaneously to increase the execution
speed.
12/31/2025 It also includes multiple hardware shifters for shifting
14
15
Memory of embedded
system
 Classifi cation of Memory
 RAM
 S RA M
 D RA M
 ROM
 ROM
 PROM
 EPROM
 EEPROM

12/31/2025 15
Input-output devices of embedded
system Sensors and
16
Actuators
• A sensor is a transducer device that converts energy from
one form to another for
e any measurement or control
purpose.
• The changes in system environment or variables are
detected by the sensors connected to the input port of the
embedded system.
• Actuator is a form of transducer device (mechanical or
electrical) which converts signals to corresponding physical
action (motion). Actuator acts as an output device.
• If the embedded system is designed for any controlling
purpose, the system will produce some changes in the
controlling variable to bring the controlled variable to the
desired value.
• It is achieved through an actuator connected to the output
12/31/2025 16
17 Cont’d…
• If the embedded system is designed for monitoring purpose
only, then 1 there is no eneed for including an actuator in the
system.
• For example, take the case of an ECG machine. It is designed
to monitor the heart beat status of a patient and it cannot
impose a control over the patient's heart beat and its order.
The sensors used here are the different electrode sets
connected to the body of the patient. The variations are
captured and presented to the user (may be a doctor) through
a visual display or some printed chart.

12/31/2025 17
Cont’d…
18

• The I/O subsystem of the embedded system facilitates the


e
interaction of the embedded system with the external world.
• The interaction happens through the sensors and actuators
connected to the input and output ports respectively of the
embedded system.
• The sensors may not be directly interfaced to the input ports,
instead they may be interfaced through signal conditioning and
translating systems like ADC, optocouplers, etc.

12/31/2025 18
19
Cont’d

• Light Emitting Diode (LED)
e
• 7-Segment LED Display
• Optocoupler
• Stepper Motor
• Relay
• Piezo Buzzer
• Push Button Switch
• Keyboard

12/31/2025 19
20 Communication interface
• Internal Communication Interface
e
• Inter Integrated Circuit(12C) Bus
• Serial Peripheral Interface (SPI) Bus
• Universal Asynchronous Receiver
Transmitter (UART)
• 1-Wire Interface
• Parallel Interface
• External Communication Interface

12/31/2025 20
21
Embedded Firmware
• Control algorithm and or the configuration settings that are
stored into the program memory of the embedded system.
• Essential part of embedded system.
• Methods for development of embedded firmware
• Write a high level program and use IDE (containing editor,
compiler, linker, debugger, simulator etc). This process is
called ‘hex file creation.’
• Write assembly language program using instructions
supported by the controller or processor used in the
application.
• Embedded programs are written using one of the following
two approaches
• Super loop approach
• Function scheduler approach.
12/31/2025 21
The Microcontroller system
22
• A microcontroller is a single-chip computer.
• Micro suggests that the devices small, and the controller suggests
that it is used in control applications.
• A microcontroller, on the other hand, has all the support
chips incorporated inside its single chip.
• All microcontrollers operate on a set of instructions (or the
user
program) stored in their memory.
• A microcontroller fetches the instructions from its program
memory one by one, decodes these instructions, and then
carries out the required operations
• Additional components may be required so the microcontrollers
can interface with its environment.
12/31/2025 22
The Microcontroller system
23

Temperature control system with a keypad and LCD


12/31/2025 23
The Microcontroller system
24
• A microcontroller is a very powerful tool that allows a designer to
create sophisticated inpuet-output data manipulation under
program control.
• Microcontrollers are classified by the number of bits they
process. Microcontrollers with 8 bits are the most popular and
are used in most microcontroller-based applications.
• Microcontrollers with 16 and 32 bits are much more powerful
but are usually more expensive and not required in most
small- or medium-size general-purpose applications that call
for microcontrollers.
• The simplest microcontroller architecture consists of a
microprocessor, memory, and input-output.

12/31/2025 24
25 The Microcontroller system

12/31/2025 25
CPU families used in
26 Microcontrollers

[Link] Vs CISC microcontroller


e

• The term RISC stands for Reduced Instruction Set


Computing.
• Atmel AVR microcontroller is an example for a RISC
processor and its instruction set contain only 32
instructions.
• The term CISC stands for Complex Instruction Set
Computing.
• The original version of 8051 microcontroller
(eg.AT89C51) is a CISC controller and its instruction
set contains 255 instructions.

12/31/2025 26
SOME OF THE CRITERIA OF RISC V/S CISC
ARE GIVEN BELOW:
RISC CISC
 It contains lesser number of  It contains greater number
instructions. of instructions.

 Instruction pipelining and  Generally no instruction


increased execution speed. pipelining
feature.
 Orthogonal instruction set(allows
each instruction to operate on any  Non-orthogonal set(all instructions
register and use any addressing are not allowed to operate on any
mode. register and use any addressing mode.

 Operations are performed on  Operations are performed on registers


registers only, only memory operations or memory depending on instruction.
are load and store.
 A large number of registers  Limited number of general
SOME OF THE CRITERIA OF RISC V/S CISC
ARE GIVEN BELOW:
RISC CISC
 Programmer needs to write
 Instructions are like macros in C language.
more code to execute a task A programmer can achieve the desired
since instructions are simpler functionality with a single instruction
ones. which in turn provides the effect of using
more simpler single instruction in RISC.
 It is single, fixed length
instruction.
 It is variable length instruction.

 Less silicon usage and pin


 More silicon usage since more additional
count. decoder logic is required to implement
the complex instruction decoding.
 With Harvard Architecture.
 Can be Harvard or Von-Neumann
Architecture.
Reading assignment cont’d
29

2. Harvard v/s Von-Neumann Architecture


• The term Harvard aend Von-Neumann refers to the
processor architecture design.
• Harvard architecture have separate data bus and
instruction bus.
• Von-Neumann architecture shares single common
bus for fetching both instructions and data.
• It was developed by the Princeton University and so it is

referred as Princeton architecture.

12/31/2025 29
Reading
Harvard v/s Von-Neumannassignment
Architecture

Harvard architecture Von-Neumann


Architecture
 It has separate buses for instruction
and data fetching.  It shares single common bus for
instruction and data fetching.
 Easier to pipeline, so high performance
can be achieve.  Low performance as compared
to Harvard architecture.
 Comparatively high cost.
 It is cheaper.
 No memory alignment problems.
 Allows self modifying code.
 Since data memory and program
memory are stored physically in  Since data memory and program
different locations, no chances memory are stored physically in
for accidental corruption of the same chip, chances for
program memory. accidental corruption of program
Reading assignment cont’d
31

[Link]-endian v/s Little-endian processors


• Endianness speciefies the order which the data
is stored in the memory by processor operations
in a multi byte system.
• If the word length is two byte then data can be stored
in 2 different ways:
a) Higher order of data byte at the higher memory and lower
order of data byte at location just below the higher
memory.
b) Lower order of data byte at the higher memory and higher
12/31/2025
order of data byte at location just below the higher
31
Reading assignment
 Little-endian means lower order  Big-endian means the higher order
data byte is stored in memory at data byte is stored in memory at the
the lowest address and the higher lowest and the lower order data byte
order data byte at the highest at the highest address.
address.  For e.g. a 4 byte integer Byte3,
 For e.g, 4 byte long integer Byte2, Byte1, Byte0 will be stored in
Byte3, Byte2, Byte1, Byte0 will the memory as follows:
be store in the memory as
follows:
Embedded Microcontroller Modules
36

• Generally, any embedded microcontrollers have the


following e
modules inside.
 Register Set.
 Memory
 Timing base or system
 Ports Systems
 Analog to digital
Converters
 Communication
Systems
 Interrupt systems
12/31/2025 33
Embedded Microcontroller
37 Modules
Register Set:
 Is the interface betweene the user and the different
subsystems
aboard the Microcontroller. They are often called Special
Function Registers (SFRs).
 Each register consists of a collection of flip-flops that can
either be set to a logic one or logic zero. Each flip-flop can
be viewed as a software configurable switch.
 The function of each register and each register bit is
carefully defined in the specific microcontroller’s
documentation.
 To configure a specific subsystem the system designer will

12/31/2025
determine the appropriate setting for each bit within the
34
39
Embedded Microcontroller
Modules
Memor
e
y • The span of addressable memory usually contains several
different types of memory including
 Static Random Access Memory (SRAM), 1536 Byte
 Electrically Erasable Programmable Read Only
Memory (EEPROM), to store configuration setting , for
PIC – 256 Byte
 Bulk programmable Flash EEPROM. – store user
program – for pic18 - 32K
• It should be emphasized that these memory components
are
contained within the confines of the microcontroller chip.
12/31/2025 35
Embedded Microcontroller
40 Modules
Memory
• To keep a track of the
memeory locations in
use and the type of
memory present within the
system, a visual tool
called a memory
map is employed.
• The memory map provides
the size in bytes of each
memory component
and its start and stop
12/31/2025 36
Embedded Microcontroller
41 Modules
Time base:/Clock
e
• The speed at which a microcontroller sequences
through
its actions is controlled by an external time base.
• The time base may be provided by an external quartz
crystal, a programmable oscillator, a ceramic resonator, or
an internal time base.
• Some microcontrollers are designed to operate at a set
specific frequency such as 8 MHz while others have been
flexibly designed to operate at a wide range of
frequencies.
12/31/2025 37
Embedded Microcontroller
42 Modules
Time base:

• Most microcontrolleers are equipped with a


multichannel timing system. The channels
within the timing system may be configured to
• Measure parameters of input signals such as
period and duty cycle.
• Generate precision output pulses or repetitive
signals.
• Count incoming pulses present in an input
signal.
12/31/2025 38
• Generate PWM signals.
2/21/17 43
Embedded microcontroller modules
44
PORT SYSTEMS:
• Microcontrollers are equeipped with a series of ports to
provide access to the world beyond the microcontroller.
• These ports are organized as eight-bit input/output ports.
• Usually a port register is equipped with an accompanying
data
direction register, which is used to set the direction (input or
output) for a given port pin.
• Many digital I/O ports have alternate functions such as
ADC, Serial Communication and network interfacing.
• some microcontroller ports are equipped with time
multiplexed capability. This simply means that the
function of a given port alternates at a prescribed
12/31/2025 40
Embedded
45
microcontroller modules
Analog-to-Digital Converters:
e
• Many microcontrollers are equipped with analog-to-digital
conversion (ADC) subsystems.

• This subsystem converts continuously varying analog


signals from the outside world into a binary
representation suitable for use by the microcontroller.

• These converters commonly have 8–10-bit resolution.

• Therefore, a continuous signal is converted to a series


of digital snapshots of the analog signal.
12/31/2025 41
Embedded
46
microcontroller modules
Communication systems:

• When we consider comemunication between two systems,


the taxonomy consists of parallel and serial
communications.

• Simply put, a parallel communication method utilizes multiple


channels, and bus wires, to send and receive multiple
streams of data simultaneously, compared to a serial
communication method where only a single stream of data is
sent and received at a time.

• Typically, parallel communication techniques are used for


short-
distance
12/31/2025
communication within and outside of a microcontroller.
42
Embedded
48
microcontroller modules
Terminology:
i. Simplex mode: In theis mode, serial communication is
accomplished by transmitting data in one direction at a
time.
ii. Duplex mode: In this serial communication mode, data
can be transmitted and received from both ends of the
communication link at the same time.
iii.
BAUD rate: The rate of bits sent or received. It describes
the number of bits communicated per second.
iv. ASCII code: is used in communication to encode alphabets,
numbers, punctuation, and control characters using a
seven- bit representation. ASCII is a subset of the
international Unicode standard.
v. Bit time: The time required to transmit or receive a single
12/31/2025 bit. 43
Embedded
49
microcontroller modules
Interrupt System:
• An interrupt causes thee microcontroller to respond to
external and internal (e.g., a timer) events very
quickly.
• When an interrupt occurs, the microcontroller leaves
its
normal flow of program execution and jumps to a
special part of the program known as the interrupt
service routine (ISR).
• The program code inside the ISR is executed, and
upon return from the ISR, the program resumes its 44
12/31/2025
Embedded
50
microcontroller modules
• Interrupt
System: e

12/31/2025 45
Embedded
51
microcontroller speed
• In general, you should use the lowest acceptable speed
e
for a given application.
• This is because that the power consumption of a
microcontroller is directly proportional to its operational
speed.
• Since many microcontroller applications are battery
powered, conserving power and hence extending
battery life is essential.

12/31/2025 46
Choosing microcontroller for specific
52 design
• The following are some of the considerations for
choosing an appropriate microcontrollere for a specific
application:
• Number of ports: Enough ports and external pins to
support application?
• Required subsystems: Equipped with the proper subsystems
for a specific application?
• Memory size and type: Memory large enough to
support application algorithm?
• Clock speed: Does the processor operate at a sufficient
speed to complete the algorithm in the required time?
• Power dissipation: Is a low power dissipation processor
required for a specific application?
• Special feature set: Fuzzy logic? Signal processing
12/31/2025 47
features? etc.
53

Thank
you

12/31/2025 48

You might also like