e. Mwangosi Micro Processor
e. Mwangosi Micro Processor
MICROPROCESSOR
LECT 1
E. MWANGOSI
OUTLINE
➢History
➢Block diagram of a computer system
❖Basic components of a computer system using block diagrams:
• Cpu
• Memory
• Input and output unit
➢Evolution of microprocessor : 4,8,16,32 and 64 byte
➢Internal structure and basic operation of a microprocessor (arithmetic and logic unit,
control unit, register sets, accumulator, condition code register, program counter, stack
pointer)
2
History
3
HISTORY
4
DIAGRAM OF A COMPUTER SYSTEM
A computer is a programmable machine that receives input, stores and manipulates
data//information, and provides output in a useful format.
Address bus
6
Basic component of micro-computer
7
2. Memory
➢ physical devices used to store data or programs.
➢ Computer main memory comes in two principal varieties: random-
access memory (RAM) and read-only memory (ROM).
➢ RAM can be read and written at anytime the CPU commands it, but
ROM is pre-loaded with data and software that never changes, so the
CPU can only read from it.
➢ ROM is typically used to store the computer's initial start-up
instructions.
➢ In a PC, the ROM contains a specialized program called the BIOS that
orchestrates loading the computer's operating system from the hard
disk drive into RAM whenever the computer is turned on or reset.
➢ In general, the contents of RAM are erased when the power to the
computer is turned off, but ROM retains its data indefinitely.
8
3. I/O Unit
9
Evolution of microprocessor
• Generally characterized by the “word” size (registers and data bus)
• 8-bit, 16-bit, 32-bit, 64-bit
• addressable memory related to the word size
Early Intel Processors
• Intel 8080 (1974)
• 8-bit, first truly usable m-processor (40 DIP)
• seven 8-bit registers (six of which can be combined as three 16-bit registers)
• 6K transistors, 2MHz clock
• Other notable 8-bit processors include Zilog Z80 (1976) (used in Osborne 1,
first portable m-computer) and Motorola 6800/6809 (1978)
• Small cost, compact packaging allowed home computer revolution
• Intel 8080 later variants
• 64K addressable RAM (16-bit bus address)
• 8-bit registers
• CP/M (control program for m-computers) OS
• 5,6,8,10 MHz
• 29K transistors
• Intel 8086/8088 (1978)
– 16-bit processor, IBM-PC used 8088
• 1 MB addressable RAM (20-bit addresses)
• 16-bit registers
• 16-bit data bus (8-bit for 8088)
• separate floating-point unit (8087)
• used in low-cost microcontrollers now 10
Other 16-bit processors
• Western Design Center (WDC 65816)
• used in Apple II and Super Nintendo
• fully CMOS, low power consumption (300 mA at 1MHz, operating voltage as low as 1.8V)
• Wait-for-Interrupt and Stop-the-Clock instructions further reduce power consumption
• one of the most popular (made in huge numbers)
• Still sold today (original 1984), used as a controller
• 24-bit address bus (16MB of memory space)
• Texas Instrument TM9900, National Semiconductor IMP-16,
etc.
• Intel 80286 (1982) IBM-AT
• Still largely a 16-bit processor
• 16 MB addressable RAM
• Protected memory
• several times faster than 8086
• introduced IDE bus architecture
• 80287 floating point unit
• Up to 20MHz 11
32-bit processors
• Motorola 680x0 series
• 32-bit registers
• 68010 (1982) adds virtual memory support
• Other successors 68020/68030/68040/68060
• Popular with UNIX operating systems in late 1980’s/early 1990’s
• Faded from computer desktop market, but had a strong standing in embedded / controller equipment
(still used)
❖ “Microprocessor wars”
• leads to elimination of some / survival of the fittest. In aftermath, the PC market
to be largely dominated by IA-32; however, much more diversity exists for the
controllers
• Intel386 (1985) IA-32
– 4 GB addressable RAM
– 32-bit registers
– paging (virtual memory)
– Up to 33MHz
• Intel486 (1989)
– instruction pipelining
– Integrated FPU
– 8K cache
• Pentium (1993)
– Superscalar (two parallel pipelines)
– Intel declines to license Pentium to others, AMD and Cyrix start their own designs 12
Intel Pentium Family
• Pentium Pro (1995)
• advanced optimization techniques in m-code
• More pipeline stages
• On-board L2 cache
• Pentium II (1997)
• MMX (multimedia) instruction set
• Up to 450MHz
• Pentium III (1999)
• SIMD (streaming extensions) instructions (SSE)
• Up to 1+GHz
• Pentium 4 (2000)
• NetBurst micro-architecture, tuned for multimedia
• 3.8+GHz
• Pentium D (Dual core)
•…
13
Programming
14
Programming (2)
• Machine Language
– binary instructions (op codes) actually read and
interpreted by the CPU
Ex: 1000 1011 0000 0101
‘move value from memory to AX register’ on intel386
– different for each CPU type
• Assembly Language
– CPU instructions represented by mnemonics
Ex: MOV AX, M same as above
– each AL instruction converts to one ML instruction
by assembler program
– Efficient fast execution, inconvenient to program in
– Allows access to instructions not available with
higher level language 15
15
Programming (3)
• High Level Language, e.g. C/C++
– easier to use
– it’s compiler’s job to translates (one) HLL
instruction into (many) ML instructions
– portable: can compile the same source (HLL
instructions) on different OS platforms
– slower and more restricted
• Interpreted Languages, e.g. JAVA, scripting
– on-the-fly translation of high level language
– slowest of the above, but often a good place to
start with a new project
16
16
ET 8304 microprocessor and interfacing
LECT 2
INTERNAL STRUCTURE AND BASIC
OPERATION OF MICROPROCESSOR
Address bus
ALU Register
Section
Data bus
3
INTERNAL STRUCTURE OF ALU
4
CONTROL UNIT
• The circuitry that controls the flow of information through the
processor, and coordinates the activities of the other units within it.
5
REGISTER SETS
• The register section/array consists completely of
circuitry used to temporarily store data or
program codes until they are sent to the ALU or
to the control section or to memory.
PC PROGRAM CONTER
15 8 7 0
SYSTEM BYTE USER VYTE SR STATUS REGISTER 7
ACCUMULATOR
• a register in which intermediate arithmetic and logic results are
stored.
• example for accumulator use is summing a list of numbers.
• The accumulator is initially set to zero, then each number in turn is added to
the value in the accumulator.
• Only when all numbers have been added is the result held in the accumulator
written to main memory or to another, non-accumulator, CPU register.
8
CONDITION CODE REGISTER (CCR) = FLAGS
• an 8 bit register used to store the status of CPU, such as carry, zero,
overflow and half carry.
9
PROGRAM COUNTER (PC)
• a 16 bit register, used to store the next address of the operation code
to be fetched by the CPU.
• Not much use in programming, but as an indicator to user only.
• Purpose of PC in a Microprocessor
• to store address of tos (top of stack)
• to store address of next instruction to be executed.
• count the number of instructions.
10
STACK POINTER (SP)
• The stack is configured as a data structure that grows downward from
high memory to low memory.
• At any given time, the SP holds the 16-bit address of the next free
location in the stack.
• The stack acts like any other stack when there is a subroutine call or
on an interrupt. ie. pushing the return address on a jump, and
retrieving it after the operation is complete to come back to its
original location.
11
DATA BUS
• The data bus is 'bi-directional'
• data or instruction codes from memory or
input/output. are transferred into the microprocessor
• the result of an operation or computation is sent out
from the microprocessor to the memory or
input/output.
• Depending on the particular microprocessor, the
data bus can handle 8 bit or 16 bit data.
12
ADDRESS BUS
• The address bus is 'unidirectional', over which the microprocessor
sends an address code to the memory or input/output.
• The size (width) of the address bus is specified by the number of bits
it can handle.
• The more bits there are in the address bus, the more memory
locations a microprocessor can access.
• A 16 bit address bus is capable of addressing 65,536 (64K) addresses.
13
CONTROL BUS
• The control bus is used by the microprocessor to send out or receive
timing and control signals in order to coordinate and regulate its
operation and to communicate with other devices, i.e. memory or
input/output.
14
MICRO PROCESSOR CLOCK
• Also called clock rate, the speed at which a microprocessor
executes instructions. Every computer contains an internal
clock that regulates the rate at which instructions are
executed and synchronizes all the various computer
components.
15
EXAMPLES OF MICRO PROCESSOR
• Intel 8086
• Motorola 6800
• Zilog Z80
16
8085 Microprocessor
• Introduction
• Overview of 8085 microprocessor
➢ 8085 Architecture
➢ Pin Diagram
➢ Functional Block Diagram
Introduction
• The technological revolution brought the invention of micro-
programmable computer on microprocessor chip
➢First four bit microprocessor chip
➢INTEL-4004 was developed by Intel Corporation of America in 1971.
LECT 3 & 4