Professional Documents
Culture Documents
Microprocessors
Your instructor
Office: C9-401
Email: nhdungset@gmail.com
• Research:
Ultra high speed video camera, Embedded system, Digital design by using FPGA
• Education:
Course 40, Electronics and Telecommunications, HUT (1997)
Course contents
1. Introduction to microprocessor systems
2. The Intel 8088/8086 microprocessors
3. Assembly programming for 8086
4. Memory and I/O Interfacing
5. Interrupt
6. Direct memory access (DMA)
7. Real life microprocessors
© DHBK 2005 4/Chapter1
References
• Slides
• Textbook: Barry B. Brey, The Intel Microprocessors:
8086/8088, 80186/80188, 80286, 80386, 80486, Pentium and
Pentium Pro Processor: Architecture, Programming, and
Interfacing, Fourth Edition, Prentice Hall, 1997.
• Acknowledgement: Special thanks to Professor Rudy
Lauwereins for sharing his slides.
© DHBK 2005 5/Chapter1
Course objective
• After completing this course, students will
Understand the architecutures and working principles of
microprocessors and microprocessor systems.
Be able to program microprocessors using assembly
Be able to select the appropriate microprocessor for a specific
application.
Understand different microprocessors in real life.
Be able to design a micro-controller based system.
© DHBK 2005 6/Chapter1
Course evaluation
• Design project (30%)
Design a AVR microcontroller based system.
This project is compulsory
• Midterm exam and homework (30%)
Homework must be completed and handed in on time. Late
submission will result grade 0 for that homework.
1 midterm exam
• Final exam (40%)
© DHBK 2005 7/Chapter1
Chapter 1
Introduction to microprocessor systems
1.1 Computer history
1.2 Microprocessor classification
1.3 Number systems (re-visited)
1.4 Structrure and working principle of microprocessor
systems
© DHBK 2005 8/Chapter1
Chapter 1
Introduction to microprocessor systems
1.1 Computer history
Generation -1: The early days (…-1642)
Generation 0: Mechanical (1642-1945)
Generation 1: Vacuum tubes (1945-1955)
Generation 2: Discrete transistors (1955-1965)
Generation 3: Integrated circuits (1965-1980)
Generation 4: VLSI (1980-?)
1.2 Microprocessor classification
1.3 Number systems (re-visited)
1.4 Structrure and working principle of microprocessor
systems
© DHBK 2005 9/Chapter1
Chapter 1
Introduction to microprocessor systems
1.1 Computer history
Generation -1: The early days (…-1642)
Generation 0: Mechanical (1642-1945)
Generation 1: Vacuum tubes (1945-1955)
Generation 2: Discrete transistors (1955-1965)
Generation 3: Integrated circuits (1965-1980)
Generation 4: VLSI (1980-?)
1.2 Microprocessor classification
1.3 Number systems (re-visited)
1.4 Structrure and working principle of microprocessor
systems
10/Chapter1
(…-1642)
• Early counting tables, named abaci, not only formalized this
counting method but also introduced the concept of
positional notation that we use today.
11/Chapter1
(…-1642)
• In the twelfth century
Muhammad ibn Musa
Al'Khowarizmi developed
the concept of a written
process to be followed to
achieve some goal, and
published this in a book:
hence the word algorithm
12/Chapter1
(…-1642)
• Codex Madrid - Leonardo Da Vinci (1500)
Drawing of a mechanical calculator...
© DHBK 2005 13/Chapter1
Chapter 1
Introduction to microprocessor systems
1.1 Computer history
Generation -1: The early days (…-1642)
Generation 0: Mechanical (1642-1945)
Generation 1: Vacuum tubes (1945-1955)
Generation 2: Discrete transistors (1955-1965)
Generation 3: Integrated circuits (1965-1980)
Generation 4: VLSI (1980-?)
1.2 Microprocessor classification
1.3 Number systems (re-visited)
1.4 Structrure and working principle of microprocessor
systems
Generation 0: Mechanical
© DHBK 2005 14/Chapter1
(1642-1945)
• Blaise Pascal, son of a tax collector, created in 1642 an
adding machine with automatic carries from one position to
the next
• Addition was achieved by the underlying gears turning as
each digit was dialed in, the cumulative total being displayed
in a window above the "keyboard”: hardwired algorithm
15/Chapter1
Generation 0: Mechanical
© DHBK 2005
(1642-1945)
• Charles Babbage
recognized in 1822 that
most navigation tables
contained lots of errors
leading to the loss of
ships.
• He applies to the British
Government for
assistance, and receives
the first government grant
for computer research
16/Chapter1
Generation 0: Mechanical
© DHBK 2005
(1642-1945)
17/Chapter1
Generation 0: Mechanical
© DHBK 2005
(1642-1945)
• Babbage designs the Difference Engine for computing the
entries in navigation tables: an application specific hard-coded
machine
18/Chapter1
Generation 0: Mechanical
© DHBK 2005
(1642-1945)
• Ada Augusta King, Countess
of Lovelace, becomes the
first programmer in 1842, by
writing a program for the
Analytical Engine,
Babbage’s second and this
time programmable device
19/Chapter1
Generation 0: Mechanical
© DHBK 2005
(1642-1945)
• The increasing population in the US, and the demands of
Congress to ask more questions in each census, was making
the processing of the data a longer and longer process.
• It was anticipated that the 1890 census data would not be
processed before the 1900 census was due unless something
was done to improve the processing methodology.
• Herman Hollerith won the competition for the delivery of data
processing equipment to assist in the processing of the data
from the 1890 US Census
• The company he founded, Hollerith Tabulating Company,
eventually became one of the three that composed the
Calculating-Tabulating-Recording (C-T-R) company in 1914,
and eventually was renamed IBM in 1924.
20/Chapter1
Generation 0: Mechanical
© DHBK 2005
(1642-1945)
21/Chapter1
Generation 0: Mechanical
© DHBK 2005
(1642-1945)
• Joseph-Marie Jacquard invented in 1801 an automatic loom
using punched cards for the control of the patterns in the
fabrics
• Algorithm in software on punched cards: general purpose
machine
22/Chapter1
Generation 0: Mechanical
© DHBK 2005
(1642-1945)
• Konrad Zuse, in Berlin, Germany, developed in 1935 his Z-1
computer in his parent's living room, a relay computer, using
binary arithmetic.
• Instruction cycle time: 6 seconds (0.17 Hz)
23/Chapter1
Generation 0: Mechanical
© DHBK 2005
(1642-1945)
• The first large scale, automatic, general purpose,
electromechanical calculator was the Harvard Mark I (AKA
IBM Automatic Sequence Control Calculator [ASCC])
conceived by Howard Aiken in the late 1930’s
• The ASCC was not a stored program machine but instead was
driven by a paper tape containing the instructions.
24/Chapter1
Generation 0: Mechanical
© DHBK 2005
(1642-1945)
• Grace Murray Hopper found the first computer bug beaten to
death in the jaws of a relay. She glued it into the logbook of
the computer and thereafter when the machine stops
(frequently) she told Howard Aiken that they are "debugging"
the computer.
Numbered pages
for USA patents
Lab book!!
© DHBK 2005 25/Chapter1
Chapter 1
Introduction to microprocessor systems
1.1 Computer history
Generation -1: The early days (…-1642)
Generation 0: Mechanical (1642-1945)
Generation 1: Vacuum tubes (1945-1955)
Generation 2: Discrete transistors (1955-1965)
Generation 3: Integrated circuits (1965-1980)
Generation 4: VLSI (1980-?)
1.2 Microprocessor classification
1.3 Number systems (re-visited)
1.4 Structrure and working principle of microprocessor
systems
26/Chapter1
(1945-1955)
• Work on ENIAC was
started in 1943 by
John Mauchly (left)
and J. Presper
Eckert
© DHBK 2005 27/Chapter1
Chapter 1
Introduction to microprocessor systems
1.1 Computer history
Generation -1: The early days (…-1642)
Generation 0: Mechanical (1642-1945)
Generation 1: Vacuum tubes (1945-1955)
Generation 2: Discrete transistors (1955-1965)
Generation 3: Integrated circuits (1965-1980)
Generation 4: VLSI (1980-?)
1.2 Microprocessor classification
1.3 Number systems (re-visited)
1.4 Structrure and working principle of microprocessor
systems
36/Chapter1
(1955-1965)
• William Shockley, John Bardeen, and Walter Brattain invent
in 1947 the "transfer resistance" device, later to be known as
the transistor
37/Chapter1
(1955-1965)
• In 1955, IBM unveiled its IBM704, a mainframe computer using
discrete transistors, connected to several dumb terminals
• The idea of central computer centers with distributed data input
and output was born
• First machine with floating point logic (5 kFlops, clock: 300 kHz)
© DHBK 2005 38/Chapter1
Chapter 1
Introduction to microprocessor systems
1.1 Computer history
Generation -1: The early days (…-1642)
Generation 0: Mechanical (1642-1945)
Generation 1: Vacuum tubes (1945-1955)
Generation 2: Discrete transistors (1955-1965)
Generation 3: Integrated circuits (1965-1980)
Generation 4: VLSI (1980-?)
1.2 Microprocessor classification
1.3 Number systems (re-visited)
1.4 Structrure and working principle of microprocessor
systems
39/Chapter1
(1965-1980)
• In 1958, Jack St. Clair Kilby of Texas Instruments (Nobel
prize physics, 2000) conceived and proved his idea of
integrating one transistor with resistors and capacitors on a
single semiconductor chip (size: half paper clip), which is a
monolithic IC: a phase shift oscillator.
40/Chapter1
(1965-1980)
• The world of computing changed radically on April 7, 1964
when IBM announced System/360, the first IBM family of
compatible machines.
41/Chapter1
(1965-1980)
• While some companies were
developing bigger and faster
machines, Digital Equipment
Corporation introduced the
PDP-8 in 1965, the first TRUE
minicomputer.
• The PDP-8 had a minuscule
instruction set and a
primitive micro-language,
and excellent interface
capability. Thus the PDP-8
became used extensively as
a process control system
© DHBK 2005 42/Chapter1
Chapter 1
Introduction to microprocessor systems
1.1 Computer history
Generation -1: The early days (…-1642)
Generation 0: Mechanical (1642-1945)
Generation 1: Vacuum tubes (1945-1955)
Generation 2: Discrete transistors (1955-1965)
Generation 3: Integrated circuits (1965-1980)
Generation 4: VLSI (1980-?)
1.2 Microprocessor classification
1.3 Number systems (re-visited)
1.4 Structrure and working principle of microprocessor
systems
© DHBK 2005 43/Chapter1
First mouse
© DHBK 2005 47/Chapter1
Source: Intel
© DHBK 2005 50/Chapter1
Source: Intel
© DHBK 2005 51/Chapter1
Source Intel
© DHBK 2005 52/Chapter1
Chapter 1
Introduction to microprocessor systems
1.1 History of computers
1.2 Microprocessor classification
1.3 Number systems (re-visited)
1.4 Structrure and working principle of microprocessor
systems
© DHBK 2005 54/Chapter1
*Engine
Performance and
Emission Control
(Traction Control)
Chapter 1
Introduction to microprocessor systems
1.1 Computer history
1.2 Microprocessor classification
1.3 Number systems (re-visited)
Decimal, Binary, Octal, Hexadecimal
Addition, subtraction, multiplication, division
Negative numbers
Integer, fixed point, fractional, floating point, BCD, ASCII
1.4 Structrure and working principle of microprocessor
systems
© DHBK 2005 61/Chapter1
Decimal
• 1234.56710=
1•1000+2•100+3•10+4•1+5•0.1+6•0.01+7•0.001
1•103+2•102+3•101+4•100+5•10-1+6•10-2+7•10-3
r = radix (r = 10), d=digit (0 d 9), m = #digits before
radix point (decimal point), n = #digits after decimal point
m 1
D d
i n
i r i
1/61
© DHBK 2005 62/Chapter1
Binary
• 1011.0112=
1•8+0•4+1•2+1•1+0•0.5+1•0.25+1•0.125
1•23+0•22+1•21+1•20+0•2-1+1•2-2+1•2-3
r = radix (r = 2), d = digit (0 d 1), m = #digits before
radix point (binary point), n = #digits after radix point
m 1
B d
i n
i 2 i
1/62
© DHBK 2005 63/Chapter1
Octal
• 7654.328=
7•512+6•64+5•8+4•1+3•0.125+2•0.015625
7•83+6•82+5•81+4•80+3•8-1+2•8-2
r = radix (r = 8), d = digit (0 d 7), m = #digits before
radix point (octal point), n = #digits after radix point
m 1
O d
i n
i 8 i
1/63
© DHBK 2005 64/Chapter1
Hexadecimal
• FEDC.7616=
15•4096+14•256+13•16+12•1+7•1/16+6•1/256
15•163+14•162+13•161+12•160+7•16-1+6•16-2
r = radix (r = 16), d = digit (0 d F), m = #digits before
radix point (hexadecimal point), n = #digits after radix
point
m 1
H d
i n
i 16 i
1/64
© DHBK 2005 65/Chapter1
Binary addition
• Decimal addition
carry 010
x 8273
y 562
sum 8835
• Binary addition
carry 0011111
x 10011011
y 1010111
sum 11110010
1/65
© DHBK 2005 66/Chapter1
Binary multiplication
1110
1101
1110
0000
1110
1110
10110110
Binary division
10111010 1110
1110
1101
1001010
1110
10010
0000
10010
1110
100
Sign-Magnitude representation
• Each number consists of two parts : sign and
magnitude
• Decimal example: +12310 (by convention also ‘123’)
and -12310
• Binary: sign represented by MSB; ‘0’ = positive, ‘1’ =
negative
• Binary example: 011002 = +1210 en 101002 = -1210
• A sign-magnitude integer with n bits lies between -
(2n-1-1) and +(2n-1-1) with two representations for 0:
000...0 en 100...0
• Generic representation of a sign-magnitude
integer: B = <s,m>
1/68
69/Chapter1
subtraction
Start Start
subtraction addition
s2=s’2
no s1=s2 yes
no yes
m1>m2
no m1<m2 yes
End
1/69
70/Chapter1
subtraction
• Multiplication and division are repeated
add/subtract & shift and can hence be carried out
with such an adder/subtractor
• Sign-magnitude representation leads to slow,
expensive adder/subtractor due to repeated
comparison and test of sign and magnitude
• This is why we represent numbers mostly using
two’s complement notation
1/70
© DHBK 2005 71/Chapter1
1/71
© DHBK 2005 72/Chapter1
1/72
© DHBK 2005 73/Chapter1
subtraction
Start Start
subtraction addition
B2=B’2+1
Br=B1+B2
End
subtraction
Addition
Subtraction
0111 +7 1001 - 7
0110 +6 1010 - 6
+ 01100 + 10000
1101 - 3 0011 +3
1/75
© DHBK 2005 76/Chapter1
FFFFH FFFFH
..... .....
mantissa exponent
31 30 23 22 0
63 62 52 51 0
BCD
• Binary Coded Decimal number
Decimal BCD
digit
0 0000
1 0001
2 0010
3 0011
4 0100
5 0101
6 0110
7 0111
8 1000
9 1001
1/80
81/Chapter1
ASCII
© DHBK 2005
Chapter 1
Introduction to microprocessor systems
1.1 History of computers
1.2 Microprocessor classification
1.3 Number systems (re-visited)
1.4 Structrure and working principle of microprocessor
systems
© DHBK 2005 83/Chapter1
Data bus
Control Bus
I/O I/O
Memory CPU
Interface devices
Monitor
Address Bus
Printers
Mouse
DRAM Intel 80X86 ISA Keyboard
SRAM Motorola 680X EISA Harddisk
ROM PowerPC PCI CD-ROM
EEPROM ... VESA DVD
Flash SCSI ...
USB
...
© DHBK 2005 84/Chapter1
• Address bus
16, 20, 24, 32, 36 bit
Addressable memory cells: 2N
E.g. 8088/8086 has 20 address bits => manageable memroy size:
220 bytes=1Mbytes
© DHBK 2005 86/Chapter1