Microprocessor Al-Azhar University Lecture 1 Dr. Mohamed Ezz Dr. Ali Halawa
Dec 30, 2015
Microprocessor Al-Azhar University
Lecture 1Dr. Mohamed Ezz
Dr. Ali Halawa
Text book ◦ Ramesh S. Gaonkar, The Z80 Microprocessor
architecture , Interfacing, Programming, and Design,.
◦ Term paper/Project Select your topic or your project (HW) as early as possible Group of max. 5 students
2
Class Materials
2
2 Lectures Weekly
1 Class Weekly
.
3
Schedule and Arrangement
You are expected to attend all of the lectures◦ Exams will be based on the class materials◦ More than four absent will not attend final exam
Group Activities ◦ Very Important
4
Participation
Must be submitted on time Late assignments will be accepted within one
week with -25% penalties Student will solve sheets questions in the
Classes. Please come ready Bonus points for first 5 student solve quiz in
the class All sheets questions must be solved by student Exam in the class every 8 lectures
5
Assignments and Quizzes
Lets Get Started
6
The Electronic Numerical Integrator and Computer (ENIAC) begins in 1938
The Computer Evolution
Mainframe
Computer, 1960
The P
C, 198
0
Mob
ile
Compu
ter 1
990
Mini-Computer, 1
970
9
History
Company
4 bit 8 bit 16 bit 32 bit 64 bit
intel40044040
800880808085
8088/68018680286
8038680486
80860pentium
zilog Z80Z8000Z8001Z8002
Motorola680068026809
680066800868010
680206803068040
The History of Intel’s Microprocessors
Home computer as imagined more than 50 years ago
1965 prediction by Intel cofounder Gordon Moore:
The number of transistors that can be built on the same size piece of silicon will double every 18 months
Moore’s Law
year
log
(p
eop
le p
er
com
pu
ter)
Streaming Data to/from the
Physical World
Excerpted from ‘The Mote Revolution: Low Power Wireless Sensor Network’, UCB, 2004.
Bell’s Law: New computing class every 10 years
16
Why do we study this stuff?
Applications
OperatingSystems
ComputerSystem
(CPU rules)
It is inside of every device that we have such as computer , printers , mobile , etc..
17
Where is the Microprocessor ?
It’s a semiconductor IC Multipurpose , programmable logic device. Reads Instructions from the Memory
Reading data from and writing data to memory and I/O
Performing arithmetic and logic ops Process the data according to the instructions Produces Output
Perform step-by-step procedure
18
What is the Microprocessor?
The uP is the ‘brain of the microcomputer’ Is a single chip which is capable of
◦ processing data◦ controlling all of the components which make up
the microcomputer system µP used to sequence executions of
instructions that is in memory uP Fetch , Decode , and Execute the
instruction The internal architecture of the
microprocessor is complex.
The Microprocessor (MPU)
20
Lecture 2
21
Block Diagram of a Computer
microprocessor (MPU) typically contains◦ Registers: Temporary storage locations for
program instruction or data.
◦ The Arithmetic Logic unit (ALU): This part of the
MPU performs both arithmetic and logical
operations
◦ Timing and Control Circuits: that keep all of the
other parts of system (Regs, ALU, memory & I/O)
working together in the right time sequence
The Microprocessor (MPU)
Microprocessors
They accept programs
Computation is performed by logic circuits that make up the Arithmetic Logic Circuit (ALU) – Add, Subtract, AND, OR, Compare, Increment, and Decrement.
ALU cannot itself move data from place to place.
Like a blindfolded juggler – ALU must wait for data to be placed in certain places.
ALU
In order to process data, the microprocessor must have control logic which tells the microprocessor how to decode and execute the program – a set of instructions.
It fetches them one at a time and decodes the instruction. Then the control logic carries out or execute the decoded instruction.
It also controls how the microprocessor works with memory, input and output.
Control Logic
A Bus is a common communications pathway used to carry information between the various elements of a computer system
The term BUS refers to a group of wires or conduction tracks on a printed circuit board (PCB) though which binary information is transferred from one part of the microcomputer to another
The individual subsystems of the digital computer are connected through an interconnecting BUS system.
Bus
There are three main bus groups◦ ADDRESS BUS◦ DATA BUS◦ CONTROL BUS
Bus
Each microprocessor works on a data word of fixed length.
Word lengths of 4 bits, 8 bits, 16 bits, and 32 bits are most common.
8-bit word length are common that it has been given the name byte.
Some 16-bit microprocessor have instruction s processed in two 8-bit bytes.
Length of Data Word
Hardware Physical Devices Program a group of instructions preformed by the
microprocessor Software a group of programs
29
The System Components
Microprocessor
Memory
I/O
A microcontroller contains a processor core, memory, and programmable input/output peripherals.
Microcontrollers include an integrated CPU, memory (a small amount of RAM, program memory, or both) and peripherals capable of input and output.
Microprocessor only contains a CPU (the kind used in a PC). In addition to the usual arithmetic and logic elements of a general purpose microprocessor,
The microprocessor includes some of the components on a chip and other components are used as peripherals.
The microcontroller includes all of the required components on one chip. You can say that microcontroller = microprocessor + Motherboard (memory
& I/O) in one chip
30
Microprocessor vs. Microcontroller
Microcontroller
One- chip
Microprocessor vs. Microcontroller
31
Microprocessor
Memory
I/O
Binary System A Bit is 0 or 1 The processor processes a group of bits called Word. The word size could be:
8-bit, 16-bit, 32-bit, or 64-bitsTherefore, the processor is named after the word size.
e.g. We say “ 8-bit Microprocessor”
32
What numbering System a Microprocessor Uses?
33
The Memory
Word Addressing
34
Given M words (location to access), how many bits l are required to address them?
Example: to address 64 MB, we need
Ml 2log
bitsl 26)2*2*2(log)2*2*64(log 101062
10102
8-bit microprocessors have an address range of 65,536 memory words in the 65,536 bytes memory
For the same memory size, 16-bit have 32,768 word memory.
Question: A 16-bit word length is used by the 80286 microprocessor. If an 80286 addresses 32 kilo-words of memory, it memory will have _____ bits of data
Memory Word
Memory Organization Viewed as a large, single-dimension array, with an address A memory address is an index into the array "Byte addressing" means that successive addresses are one byte
apart0
1
2
3
4
5
6
...
8 bits of data
8 bits of data
8 bits of data
8 bits of data
8 bits of data
8 bits of data
8 bits of data
Cache Memory◦ Serves as a buffer for frequently accessed data ◦ Small High Cost
RAM (Main Memory)◦ Stores programs and data that the computer needs when executing a
program ◦ Dynamic RAM (DRAM)
Uses Tiny Capacitors Needs to be recharged every few milliseconds to keep the stored data
◦ Static RAM (SRAM) Holds its data as long as the power is on D Flip Flop
Types of Memory
ROM ◦ Stores critical information necessary to operate the system.◦ Hardwired can not be programmed
Programmable Read Only Memory (PROM)◦ Can be programmed once using appropriate equipment
Erasable PROM (EPROM) ◦ Can be programmed with special tool ◦ It has to be totally erased to be reprogrammed
Electrical Erasable PROM (EEPROM) ◦ No special tools required ◦ Can erase a portion
Types of Memory (Cont.)
The idea ◦ Hide the slower memory behind the fast memory ◦ Cost and performance play major roles in selecting the memory.
Memory Hierarchy
40
42
Computer Languages
43
Computer Languages
Sample of Z80 Language
44
Assembly Language (mnemonic form)
Machine Language