Lecture #1: Microprocessors
Lecture #1: Microprocessors
Introduction
Microprocessors
1
Course
Week 1,2:
Syllabus
- Introduction to microcontroller
- Evolution of the microprocessor
- Introducing the architecture of the microprocessor
Week 3:
- Data Addressing modes
Week 4:
- why assembly language
- Structur of Assembly language program:
i) Defining memory variables using the DB, DW and the DD directives.
ii) Defining arrays using the DUP directive, and strings.
iii) Defining constants using EQU directive.
iv) Sample program to demonstrate the simplified directives method of
writing assembly programs.
Course
Week 5:
Syllabus (Continued)
- Assembly Language Instructions (continued)
- Input L output instruction set
Week 6:
- Assembly Language Instructions (continued)
-Data transfer Instructions
Week 7:
- Assembly Language Instructions (continued)
- Arithmetic Instructions
Week 8:
-Assembly Language Instructions (continued)
- Program Control and Processor Control Instructions
Course Syllabus (Continued)
Week 9:
- Assembly Language Instructions (continued)
- Bitwise and Logical Manipulations :
Week 10:
- Assembly Language Instructions (continued)
- String Instructions
Week 11:
- Assembly Language Instructions (continued)
- Program Modules and procedures
Week 12:
- - Assembly Language Instructions (continued)
- - Arrays
Week 13:
- Assembly Language Instructions (continued)
- Arrays and Files
Week 14:
-8086/8088 hardware specifications
-Pin-outs and pin functions.
-Clock generator(8284A).
-Bus buffering and latching
- Bus timing
-Ready and wait state
-Minimum mode versus maximum mode
Marking Scheme & Textbook
Marking scheme
First Control Test : 15%
Second Control Test : 15%
Assignments , and Term project: 10%
Final exam : 60%
Textbook
- Barry B.Brey ,”The intel microprocessors 8086/8088, 80186/80188, 80286, 80386, 80486,
Pentium,Pentium pro processor,Pentium II,Pentium III, Pentium 4”,2003.
2- Hanel H. Jhon.,”Hand Book of Pentium Microprocessors”, 1997.
3-Peter Abel,”IBM PC Assembly language and programming”,2001.
What is Computer ?
Data Storage
Major Components of a Computer
MEMORY
I/O SYSTEM
BUS
Computer
CPU
What is Microprocessor ?
CPU
Past Microprocessors ...
1971 - Intel 4004, 1st single chip CPU, 4-bit processor
1972 - Intel 4040, enhanced 4004, 60 instructions
1972 - Intel 8008, 8-bit P
1972 - Texas Instrument TMS 1000, 1st single C, 4-bit
1974 - Intel 8080, successor to the 8008, used in Altair 8800
1975 - Motorola 6800, used MOS technology
1976 - Intel 8085, updated 8080, +5V power supply
1976 - Zilog Z80, improved 8080
1976 - TI TMS 9900, 1st 16-bit P
1978 - Zilog Z8000, Motorola 68000, 16-bit P
1978 - Intel 8086, 16-bit, IBM’s choice...
microprocessor
a- The 4-bit microprocessor
- In 1971, Intel corporation released the first microprocessor the 4004, a
4-bit microprocessor
- It only addressed 4096X 4-bit memory locations
- Instruction set are 45 different instructions
- Used only in limited applications such as video games and small
microprocessor-based controllers.
b- The 8-bit microprocessor
- Later in 1971, Intel corporation released the first 8-bit microprocessor -
the 8008
- In 1973 Intel Corporation released the 8080 microprocessor which is
also 8-bit microprocessor. It addresses more memory and executes more
instructions and also executes instructions ten times faster than the 8008
microprocessor. I.e. an addition that took 20 micro sec. on an 8008-based
system took only 2.0 micro sec. on an 8080-based system.
- In 1977, a newer version of 8085, 8080 was introduced by Intel
corporation. The main difference is the adds take 1.3 micro sec. instead of
2.0 micro sec. It executes instruction at the rate of 0.5 MIPS.
microprocessor (continued)
MEMORY
I/O SYSTEM
BUS
CPU
Past Microcontrollers ...
1972 - Texas Instrument TMS 1000, 1st single C, 4-bit
1976 - Intel 8048, 8-bit C, 1k ROM, 64b RAM, 27 I/O
1980 - Intel 8051, 4k ROM, 128b RAM, 32 I/O, 2 16-bits timers
1980s
(MCS-51 family)
- Intel 8031, 8052, 8751, …
- Atmel AT89C51, AT 89C1052/2051,…
- Dallas Semiconductor DS5000 series…
- Philips, National Semiconductor, ...
(Other Cs)
Microchip PIC16 series, Motorola 68HC11, Zilog’s Z86
General Structure of a C
I/O
Interrupt
Control Serial Parallel
Interface Interface
Intel 8051
Motorola 68HC11
Zilog Z86
Microchip PIC16XX
Microprocessor System Vs Microcontroller System
Data Bus
CPU CPU RAM ROM
General Serial
purpose RAM ROM I/O Timer COM
Micro Port Serial
Port I/O
processor Timer
Port COM
Port
Address Bus
Arithmetic/Logic Unit
Registers
To synchronize and control the
overall operation of the P system
Arithmetic/Logic Unit
Arithmetic/Logic Unit
Registers
To perform shift and rotate
operations that may either be
arithmetic or logical in nature
• Control and Status Registers
• User-Variable Registers
Registers
Registers
Control & Status User-Visible
Registers Registers
BH BL
Word value 143E BX 14 3E
DH DL AH AL
Double word 78 9A 34 5B
789A345B DX AX
Or
78 9A 34 5B
EAX
Data Transfer from register to
memory
AH AL
16FFF 12 34
17000 34
17001 12
17002
Data Transfer from memory to
register
AH AL
16FFF 12 34
17000 34
17001 12
17002
Memory
Memory Address-1 Memory Location-1
Memory Address-2 Memory Location-2
1 2 3 4 5 6 7 8
1 word = 8-bit data
(for 8051)
8 28 = 256
16 216 = 65 536 = 64 K
20 220 = 1 048 576 = 1 M
24 224 = 16 777 216 = 16 M
32 232 = 4 294 967 296 = 4 G
Bus System (II)
Data Bus
These are the data signals that travel out of and
into the P (bi-directional).
The number of wires in the data bus depends on
the word size that the P operates with.
An 8-bit P will have a data bus consisting of 8
wires and a 32-bit P will have a data bus with 32
wires.
Bus System (III)
Control Bus
The control bus consists of wires, some of which
carry signals from the CPU to external devices,
while others carry signals from external devices to
the CPU.
The number of wires present in the control bus
varies from one P to another.
Examples of control bus signals are READ/,
WAIT, READY, and HOLD.
von Neumann Architecture
ALU I/O
Main
Memory
CU
Basic Instruction Cycle
PC = 0000H Start
End
Memory Read Operation - Step 1
The CPU sends out the control signals Memory
Request and Read to indicate that it wants to
read from memory
CPU Read Memory
Memory request
Data bus
Address bus
Data bus
Address bus
Address bus
Data bus
Address bus
Address bus
Address bus
8086 16 1 Mbytes
8088 8 1 Mbytes
80186 16 1 Mbytes
80286 16 16 Mbytes
80386DX 32 4 Gbytes
80386SX 16 32 Mbytes
80486 32 4 Gbytes
80286 80386
80386 80486
ORG 0000H
MOV A, #01H
LOOP: RL A
MOV P1, A ; output to port 1
JMP LOOP
END
Assembling A Source Program
An assembler is a program that translate an assembly
language program into a machine language program.
program.obj
program.src asm51
program.lst
Linking Object Files
A linker/locator is a program that combines relocatable
object programs (modules) and produces an absolute
object program that is executable by a computer.
program
File3.obj
File2.obj RL51
File1.obj
program.m51
BIN to HEX conversion
program.bin OH program.hex
Download to 8051
Memory
00000 Interrupt Vectors
00400 BIOS and DOS Data
8086 - 1 megabyte of
DOS
memory (220 bytes)
Each byte is accessed Application
Program Area
by specifying an
A0000
address (00000h
Video
through FFFFFh) B0000
C0000
20-bit addresses must
be formed from 16- D0000 Reserved
bits of information E0000
F0000 BIOS