0% found this document useful (0 votes)
93 views41 pages

Microprocessor and Embedded System: American Internaional University - Bangladesh

This document provides an overview of a course on microprocessors and microcontrollers. It outlines the objectives of the course, which are to introduce popular microprocessors and microcontrollers, provide historical context on their evolution, explain the differences between microprocessors and microcontrollers, review their applications, and discuss their performance specifications. The document also includes details on the reference books for the course, distribution of marks for exams and labs, lecture topics, and an introduction to microprocessors and their advantages and disadvantages.

Uploaded by

Tawhid Khondakar
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)
93 views41 pages

Microprocessor and Embedded System: American Internaional University - Bangladesh

This document provides an overview of a course on microprocessors and microcontrollers. It outlines the objectives of the course, which are to introduce popular microprocessors and microcontrollers, provide historical context on their evolution, explain the differences between microprocessors and microcontrollers, review their applications, and discuss their performance specifications. The document also includes details on the reference books for the course, distribution of marks for exams and labs, lecture topics, and an introduction to microprocessors and their advantages and disadvantages.

Uploaded by

Tawhid Khondakar
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/ 41

AMERICAN INTERNAIONAL UNIVERSITY – BANGLADESH

Where leaders are created

Microprocessor and
Embedded System
Spring’2020-21

Department of EEE
Reference Book

• Microprocessor and Microcomputer-based System Design – by


Mohammad Rafiquzzaman.
• Digital Logic and Computer Design – by M. Morris Mano

Microprocessor I/O 2
Objectives
• To introduce the students to some popular microprocessors and microcontrollers
• To gain some historical perspective regarding the evolution of microprocessors
• To understand the difference between microprocessors and microcontrollers
• To inform the students about the applications of microprocessors and
microcontrollers in our everyday lives
• To review the performance specification of some popular microcontrollers

Microprocessor I/O 3
Marks distribution for theory

Microprocessor I/O 4
Marks distribution for Lab
Term Assessment Tools Marks
Mid-Term Attendance 10
Continuous Performance 10
Lab Report 20
Quiz 20
Viva 20
Project Proposal + gantt chart 20
Total Marks of Mid-Term: 100
Final-Term Attendance 10
Continuous Performance 10
Lab Report 20
Viva + Project demonstration 20
Project Report 20
Project Status meetings 5
Project Presentation 15
Total Marks of Final-Term: 100

Microprocessor I/O 5
Marks Evaluation for Project:
Topics Breakdown Marks Deadline
Proposal Title 5
Explain to students within Mid-Term 2nd
Objectives 5
week in detail
Modeling of Project [Block
5
Diagram]
Submission deadline: Mid-Term 5th Week
Gantt chart 5
to 6th Week
Total Marks for Proposal: 20
Last 20 minutes of each Lab, each group
Meeting with
Project Status meetings 5 individually inform the project update to
Faculty
Faculty [Final Term 1st Week to 5th Week]
No
Report Title
marks
Abstract 1
Introduction 2
Literature Review 3
Modeling of Project [Block No Final Term 5th Week
Diagram] marks
Implementation 5
Testing and Result 5
Cost Analysis 2
References 2
Total Marks for Report: 20
Presentation Oral 15 Final Term 6th Week

Microprocessor I/O 6
Lecture-1
Introduction to Microprocessors and
Microcomputer based applications

Microprocessor I/O 7
Introduction to Microprocessors
 What is a microprocessor?
• The microprocessor is the heart of any normal computer, whether it is a desktop
machine, a server or a laptop. The microprocessor you are using might be a Pentium, a
K6, a PowerPC, a Sparc or any of the many other brands and types of microprocessors,
but they all do approximately the same thing in approximately the same way.

• A microprocessor is also known as CPU (Central Processing Unit) which is a complete


computation engine that is fabricated on a single chip.

• Microprocessor is an engine which can compute different operations. The internal


architecture of a microprocessor determines the types and process of operations
execution.

Microprocessor I/O 8
Evolution of Microprocessors
First Generation Microprocessors
• The first microprocessor - 1971. Model: Intel 4004.
• Intel 4004  4 bit microprocessor (not so powerful)
Operations: Addition and Subtraction 4 bits at a time
Instruction set: 46 instructions
Fabrication technology: PMOS
Instruction execution rate: 50 KIPS (Kilo Instructions Per Second)
• Instructions were processed serially: Fetch  Decode (Machine code) Execute
(After completing an instruction, microprocessor updates the instruction pointer and
fetched the subsequent instruction. Hence, perform the consecutive operation for each
instruction in turn)
• Intel 4040  4-bit (updated version of 4004)
Instruction set: 60 instructions
Execution rate: 60 KIPS
Applications: Microwave, small control system and calculators

Microprocessor I/O 9
Evolution of Microprocessors (Contd.)
Second Generation
• First home computer microprocessor
− Intel 8080 8-bit, in 1974
− Intel 8085, in 1976 (update of 8080)
 Updated features: two Enable/Disable Instructions, three interrupt pins and serial
I/O pins, Instruction internal clock and higher clock frequency
Third Generation
• Perform like mini computer
− Intel 8086 16-bit, in 1978
 Instruction execution rate: 2.5 MIPS (Millions of Instructions per sec)
 1M(Mega Byte) memory size
 6 bytes instruction cache that pre-fetch instruction before execution
 Significant disadvantage is not supporting floating point instruction (ex: 123.456;
microprocessor 8085 and 8086 do not support such instruction)

Microprocessor I/O 10
Evolution of Microprocessors (Contd.)
Fourth Generation
• Outstanding architecture with million transistors
− Intel 80960CA
− Motorola 88100
 Could issue and retire more than one instruction per clock cycle
Fifth Generation
• PCs are a low-margin and high volume business conquered by a single microprocessor
− Intel 8087
− Intel 8088- incorporated with IBM PC
− In the successive years, PC market moved from 8088  80286  80386  80486
 Pentium  Pentium II  Pentium III  Pentium IV (manufactured by Intel)
− From 2004, multiple cores microprocessors with more than million transistors were
manufactured by Intel.

Microprocessor I/O 11
Advantages and Disadvantages of
Microprocessors
Advantages: Disadvantages:
 The processing speed is ˟ Microprocessors might get
evolving with every new overheated
upgrade of versions. ˟ Microprocessor has a limitation
 Can quickly move data into on the size of data.
different address locations ˟ Most of the microprocessor does
 Flexible and easy not support floating point
operations.
maintenance.
˟ The microprocessor does not
 Compact in size and power
have any internal peripheral like
consumption is very low. ROM, RAM and other I/O devices.

Microprocessor I/O 12
The applications of the microprocessors
 Instrumentation: Frequency counters, function generators, frequency synthesizers, spectrum
analyzer. It is also used in medical instrumentation.
 Control: Microprocessor based controllers are available in home appliances, such as
microwave oven, washing machine etc.
 Communication: Microprocessors are being used in a wide range of communication
equipment. In telephone industry, these are used in digital telephone sets. Telephone
exchanges and modem etc. The use of microprocessor in television, satellite communication
have made teleconferencing possible. Railway reservation and air reservation system also uses
this technology. LAN and WAN for communication of vertical information through computer
network
 Office Automation and Publication: Microprocessor based micro computer with software
packages has changed the office environment. Microprocessors based systems are being used
for word processing, spread sheet operations, storage etc.
 Consumer Products: The use of microprocessor in toys, entertainment equipment (play
station) and home applications is making them more entertaining and full of features

Microprocessor I/O 13
What is a Microcontroller?
• Microcontroller is a computer on‐a‐chip optimized to manage electric
gadgets. It is intended particularly for precise tasks like controlling a
particular system. A microcontroller sometimes uses abbreviated µC, or MCU
• A fixed-in system is a computer system intended to carry out one or more
functions over and over again with real‐time work out limits.
• Does not have any operating system as it can perform only one task at a time.

Microprocessor I/O 14
Advantages of microcontrollers

Microprocessor I/O 15
Difference Between Microprocessors and
Microcontrollers
Microprocessor: Microcontroller:
• Dedicated for gaming, web browsing, document, etc. • Dedicated for specific tasks like camera, oven,
• Clock speed is 1GHz to 4GHz washing machine
• RAM size is from 512 MB to 32GB • Clock speed is 1MHz to 300MHz
• ROM(hard disk) size is 128 GB to 2 TB • RAM size is from 2KB to 256KB
• Can handle 32bits of data at the same time or 64bits • Flash memory is from 32KB to 2MB
of data at the same time. • Can handle 8 bits of data at the same time or
• Memory, RAM, ROM, I/O ports are connected 16bits of data at the same time or 32bits of
externally to CPU data at the same time.
• Memory, RAM, ROM, I/O ports are connected
internally along with CPU

Microprocessor I/O 16
Microprocessor I/O 17
Popular Microcontrollers
• At present, some of the popular microcontroller families in the market are:
• ATMega family: ATMega328P, ATMega32
• Pic-chips: Pic24, Pic33 etc
• ARM processors: Raspberry Pi, TM4C chips

• In Bangladesh, ATMega based Arduino boards have gained wide popularity due to easy
availability and low price

• We are going to mostly focus on the ATMega328P chip during this semester

Microprocessor I/O 18
What is an Embedded System?
• An Embedded System can be best described as a system which has both
the hardware and software and is designed to do a specific task. A good
example for an Embedded System, which many households have, is a
Washing Machine.
• We use washing machines almost daily but wouldn’t get the idea that it
is an embedded system consisting of a Processor (and other hardware
as well) and software.

• Embedded Systems can not only be stand-alone devices like Washing


Machines but also be a part of a much larger system. An example
for this is a Car. A modern day car has several individual embedded
systems that perform their specific tasks with the aim of making a
smooth and safe journey.
• Some of the embedded systems in a Car are Anti-lock Braking System
(ABS), Temperature Monitoring System, Automatic Climate Control,
Tyre Pressure Monitoring System, Engine Oil Level Monitor, etc.

Microprocessor I/O 19
Microprocessor Data Type

• Unsigned and Signed Binary Integers


• BCD Numbers(Binary Coded Decimal)
• ASCII(American standard code for information interchange)
• Floating point Numbers

Microprocessor I/O 20
Microprocessor Data Type

• Unsigned and Signed Binary Integers


• An unsigned binary integer has no arithmetic sign
• Example of unsigned integer is memory address
• Signed integer is represented in true form for a positive
number and in two’s compliment form for a negative
number.

Microprocessor I/O 21
Microprocessor Data Type (Cont..)

• BCD Numbers
• Microprocessor stores BCD numbers in two forms, packed and unpacked.
• The unpacked BCD number represents each BCD digit as a byte
• The packed BCD number represents two BCD digits in a byte
• ASCII
• This Code represents alphanumeric in a microprocessor’s memory
• It also represents special symbol.

Microprocessor I/O 22
Microprocessor Data Type
• Floating Point Number (IEEE-754 single precision)
• Floating point numbers contains three components – sign, exponent and mantissa.
• For the decimal value -2.5×10−2 , sign is negative, exponent is -2 and mantissa is 2.5.
• A binary floating point number is represented as a normalized binary fraction raised
to a power of 2.
• Binary number is converted to a 32 bit floating point format.
• Most significant bit is sign bit which is 0 for positive number and 1 for negative
number.
• The next 8 bits contains the bias exponent i.e. (7𝐹)16 or (127)10 is added to the
new exponent.
• Minimum value of exponent is (0)10 and maximum value is (255)10
• Remaining 23 bit represents the fractional part of the number.

Microprocessor I/O 23
Microprocessor Data Type
• Example: Convert decimal number (10)10 to standard floating point format.
• Step-1: Convert the given number to binary. [Note: Any number given in any format
should be converted to binary first]
(10)10 = (1010)2
• Step 2: Bring a decimal to the right of the first ‘1’.
1010= 1010.0×20 = 101.0×21 = 10.10×22 = 1.010 × 2sign 3
= 0.1010 × 24
• Step 3: Look for the sign of the given number. Here the number is (10)10 , this
number is positive therefore mantissa
sign s= 0 for positive [Note: s=1 for negative]
This is the first bit of the 32 bit floating point format.
• Step 4: Bias the exponent of the number, means adding decimal (127)10 with the
exponent or adding hexadecimal (7𝐹)16 with the exponent. Since the exponent is
always in decimal, it is better to add (127)10 with the exponent.

Microprocessor I/O 24
Microprocessor Data Type
Biasing exponent = (127)10 + (3)10 = (130)10
Then convert the biasing exponent to binary which will always be 8 bit.
(130)10 = (1000 0010)2
• Step-5: The next 23 bit represents the fractional part of the number.
23 bit fraction = 0100 0000 0000 0000 0000 000
• Step 6: The floating point equivalent of (10)10is:

Microprocessor I/O 25
Exercise
• Convert (−74.92)10 standard floating-point format.

Microprocessor I/O 26
Overview of microcomputer structure and
operation
Major Parts:
1. CPU
2. Memory
3. Input / Output circuitry
4. Buses:
a) Address bus
b) Data bus
c) Control bus

Microprocessor I/O 27
Overview of microcomputer structure and
operation (Cont..)
• Memory:
• It stores the binary codes for the sequences of instructions.
• It stores binary coded data.
• Example: ROM, RAM, magnetic / optical disks.
• Input / Output:
• They are used to take in data from outside world or send data to the outside
world.
• I/O devices are connected with microprocessor through I/O ports.
• Example: Keyboards, video display terminals, printers, modems

Microprocessor I/O 28
Overview of microcomputer structure and
operation (Cont..)
• Central Processing Unit:
• It controls the operation of computer.
• The CPU fetches binary-coded instructions from memory.
• Decodes the instructions into a series of simple actions.
• Carries out these actions in a sequence of steps.
• Important components: IP, General purpose register and control bus signal
generating circuits.
• Address Bus:
• It consists of 16, 20, 24, 32 or 36 parallel unidirectional signal lines.
• On these lines the CPU sends out the address of the memory location or I/O port
that is to be written to or read from.
• The number of locations that the CPU can address is determined by the number of
address lines.

Microprocessor I/O 29
Overview of microcomputer structure and
operation (Cont..)
• Data Bus:
• Data bus consists of 8, 16, 32 parallel bidirectional signal lines.
• Many devices in the system will have their output connected to data bus, but
only one device at a time will have its output enabled.
• Control Bus:
• The control bus consists of 4 to 10 parallel signal lines.
• The CPU sends out signals on the control bus to enable the outputs of
addressed memory devices or port devices.
• Example of control signals: Memory read, Memory write.

Microprocessor I/O 30
How to read a byte of data?
• The CPU sends the address of the desired byte on the address bus
• Then sends out a memory read signal on the control bus
• Memory read signal enables the addressed memory device to output a data word
on the data bus
• The data word from memory travels along the data bus to the CPU

Microprocessor I/O 31
Memory Organization

1. Processor memory
2. Primary or main memory
3. Secondary memory
1. Processor Memory:
• It refers to the microprocessor registers which are used to hold temporary
results when computation is in progress.
• No speed disparity between these registers and microprocessor because they
are fabricated using the same technology .
• Costly.

Microprocessor I/O 32
Memory Organization (Cont..)
2. Primary Memory:
• This is the storage area in which all programs are executed.
• The microprocessor can directly access only those items that are stored in primary
memory.
• All programs and data must be within the primary memory prior to execution
• Example: ROM, RAM
3. Secondary Memory:
• It stores program and data in excess of main memory.
• Microprocessor can not directly execute programs which are stored in secondary
memory.
• In order to execute these programs, the microprocessor must transfer them to its
main memory by a system program called operating system.
• Example: Floppy disk, Hard disk, CD etc.

Microprocessor I/O 33
Main memory array design
• Large capacity memory is realized by
interconnecting several small sized memory
blocks.
• Three techniques are frequently used-
1. Linear decoding
2. Partial decoding
3. Memory Decoding using PAL
• Memory is organized as 1024 words with 8
bits /word. Each word has specific address
and this is specified on 10 bit address lines
A9–A0.
• The inputs and outputs are routed through 8
bit bidirectional data lines.

• The operation of this chip is governed by two control inputs WE’ (write enable) and
CS (chip select).

Microprocessor I/O 34
Linear decoding
• This technique uses the unused address lines of the microprocessor as
chip selects for the memory chip. This method is used for small systems.
• A simple way to connect an 8-bit microprocessor to a 6Kbyte RAM
system utilizing 1kbyte RAM chips using linear decoding is shown in the
following diagram. The principle advantage of this method is that it does
not require any decoding hardware.

Disadvantage:
˟ Wastage of address space
˟ Address map is not contiguous (next or together in sequence)
˟ Bus conflict may occur (If more than one chips are selected at a time)
˟ Fold back (If all unused address lines are not connected as chip select)

Microprocessor I/O 35
Microprocessor I/O 36
Microprocessor I/O 37
Partial Decoding

Difficulties such as bus conflict and sparse address distribution are


eliminated by the use of the full/partial decoded address technique.

The memory system is enabled only when the lines A15 through
A13 are zero.
Full decoding requires all address bits to be used by necessary size
decoders.

Microprocessor I/O 38
Microprocessor I/O 39
Exercise

• A 8 bit processor has 20 bit address bus. This processor uses a single
4k x 8RAM chip. To increase the memory capacity to 32 kbytes how
many RAM chips required?
• Show the memory organization using both Linear and Partial
Decoding.
• Which decoding method is better and why?

Microprocessor I/O 40
References:

1. https://computer.howstuffworks.com/microprocessor1.htm
2. https://www.pcworld.com/article/171171/influential-processors.html#slide12
3. https://www.theengineeringprojects.com/2017/08/introduction-to-atmega328.html
4. https://www.embeddedrelated.com
5. https://www.electronicshub.org/basics-of-embedded-c-program/

Microprocessor I/O 41 41

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy