0% found this document useful (0 votes)
1 views

e. Mwangosi Micro Processor

The document provides an introduction to microprocessors, covering their history, basic components, and evolution from early models like the Intel 8080 to more advanced processors. It details the internal structure and operations of microprocessors, including the functions of the CPU, memory, and I/O units, as well as the significance of various buses and registers. Additionally, it discusses programming languages used for microprocessor development and provides specific examples of microprocessors such as the Intel 8085 and 8086.

Uploaded by

Proxima Yus
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)
1 views

e. Mwangosi Micro Processor

The document provides an introduction to microprocessors, covering their history, basic components, and evolution from early models like the Intel 8080 to more advanced processors. It details the internal structure and operations of microprocessors, including the functions of the CPU, memory, and I/O units, as well as the significance of various buses and registers. Additionally, it discusses programming languages used for microprocessor development and provides specific examples of microprocessors such as the Intel 8085 and 8086.

Uploaded by

Proxima Yus
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/ 60

INTRODUCTION OF

MICROPROCESSOR

MBEYA UNIVERSITY OF SCIENCE AN TECHNOLOGY

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

➢Fecthing and execution cycles.

➢Nibble, byte, word dan longword

➢Internal structure and basic operation of a microprocessor (arithmetic and logic unit,
control unit, register sets, accumulator, condition code register, program counter, stack
pointer)

➢Bus system: data bus, address bus and control bus.


➢Microprocessor clock system
➢Examples of microprocessor: 8085,8086.

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.

Diagram Of A Computer System 5


BLOCK DIAGRAM OF A BASIC COMPUTER
SYSTEM
❖ Basic computer system consist of a Central processing unit (CPU),
memory (RAM and ROM), input/output (I/O) unit.

Address bus

ROM RAM I/O I/O


CPU interface devices

Data bus Control


bus

Block diagram of a basic computer system

6
Basic component of micro-computer

1. CPU - Central Processing Unit


• the portion of a computer system that carries out the instructions of a
computer program
• the primary element carrying out the computer's functions. It is the unit that
reads and executes program instructions.
• The data in instruction tells the processor what to do.

Pentium D dual core processors

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

• Input/output (I/O), refers to the communication between an


information processing system (such as a computer), and the outside
world possibly a human, or another information processing system.
• Inputs are the signals or data received by the system, and outputs are
the signals or data sent from it.
• Devices that provide input or output to the computer are called
peripheral
• On a typical personal computer, peripherals include input devices like
the keyboard and mouse, and output devices such as the display and
printer. Hard disk drives, floppy disk drives and optical disc drives serve
as both input and output devices. Computer networking is another
form of I/O.

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

• Interpreted High Level


Language
• Compiled High Level
Language
• Assembly Language
• Machine Language

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

MBEYA UNIVERSITY OF SCIENCE AN


TECHNOLOGY
OCTOBER 2022

LECT 2
INTERNAL STRUCTURE AND BASIC
OPERATION OF MICROPROCESSOR

Address bus
ALU Register
Section
Data bus

Control and timing


section Control bus

Block diagram of a microprocessor


2
ARITHMETIC AND LOGIC UNIT (ALU)
• The component that performs the arithmetic and
logical operations

• the most important components in a


microprocessor, and is typically the part of the
processor that is designed first.

• able to perform the basic logical operations (AND,


OR), including the addition operation.

3
INTERNAL STRUCTURE OF ALU

2 bits of ALU 4 bits 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.

• In a way, it is the "brain within the brain", as it controls what happens


inside the processor, which in turn controls the rest of the PC.

• On a regular processor, the control unit performs the tasks of


fetching, decoding, managing execution and then storing results.

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.

• The number of registers are different for any


particular CPU and the more register a CPU have
will result in easier programming tasks.

• Registers are normally measured by the number


of bits they can hold, for example, an "8-bit
register" or a "32-bit register".
6
REGISTER IN MOTOROLA 68000
MICROPROCESSOR
31 16 15 8 7 0
D0
D1
D2
D3 DATA REGISTERS
D4
D5
D6
D7
31 16 15 8 7 0
A0
A1
A2
A3 ADDRESS REGISTERS
A4
A5
A6
A7

USER STACK POINTER


A7 STACK POINTER
SUPERVISOR STACK POINTER

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.

➢Intel introduced in 1972 an 8-bit microprocessor 8008 and in 1973 another 8-


bit microprocessor 8080. The microprocessor 8080 was the most popular
microprocessor of the early 70s. In the year 1974, Intel developed a 40 pin
microprocessor chip 8085, which was the enhanced version of 8080.

➢Intel 8080 microprocessor was not in fact a complete CPU on a chip


because the clock and controller were on separate chip. Further, it utilizes two
separate power supplies. The 8085 microprocessor has the advantages over
8080 that it has on-chip clock and control circuit. It needs only one power
supply of +5 volts.
ARCHITECTURE OF 8085 MICROPROCESSOR

• Intel 8085, an 8-bit microprocessor is available in the form of 40 Pin


dual in line IC package. It is fabricated on a single LSI chip. It operates
on +5 V d.c. supply.
• The clock speed used in this microprocessor is about 3 MHZ.
• General Purpose 8-bit microprocessor is capable of addressing up
to 64 K bytes (i.e. 2^16= 655362 bytes) of memory.
main functional components of 8085A
microprocessor
I. Register Section
II. Arithmetic and Logic Unit
III. Timing and Control Section
IV. Interrupt Control
V. Serial Input / Output Control
Pin Diagram 8085 microprocessor
8085 Architecture
ET 8304 microprocessor and interfacing

MBEYA UNIVERSITY OF SCIENCE AN TECHNOLOGY


OCTOBER 2022

LECT 3 & 4

INSTRUCTION SET AND EXECUTION IN 8085


Outlines

• INSTRUCTION SET 8085


• Classification based on functionality
• Classification based on instruction length:
• Classification based on operand addressing Modes in Instructions
• INSTRUCTION EXECUTION AND TIMING DIAGRAM:
Instruction set
• An instruction is a binary pattern designed inside a
microprocessor to perform a specific function.

• Based on the design of the ALU and decoding unit, the


microprocessor manufacturer provides instruction set for every
microprocessor. The instruction set consists of both machine code
and mnemonics.
• Microprocessor instructions can be classified based on the
parameters such functionality, length and operand addressing.
Classification based on functionality:
• Data transfer operations: This group of instructions copies data
from source to destination. The content of the source is not altered.
• Arithmetic operations: Instructions of this group perform
operations like addition, subtraction, increment & decrement. One
of the data used in arithmetic operation is stored in accumulator and
the result is also stored in accumulator.
• Logical operations: Logical operations include AND, OR, EXOR,
NOT. The operations like AND, OR and EXOR uses two operands,
one is stored in accumulator and other can be any register or
memory location. The result is stored in accumulator. NOT
operation requires single operand, which is stored in accumulator.
Cont..
• Branching operations: Instructions in this group can be used to
transfer program sequence from one memory location to another
either conditionally or unconditionally.
• Machine control operations: Instruction in this group control
execution of other instructions and control operations like interrupt,
halt etc.
Classification based on instruction length:
• One-byte instructions: Instruction having one byte in machine code.
Cont..
• Two-byte instructions: Instruction having two byte in machine code.
Cont..
• Three-byte instructions: Instruction having three byte in machine
code.
Classification based on Addressing Modes in
Instructions:
• The process of specifying the data to be operated on by the
instruction is called addressing.
• The various formats for specifying operands are called addressing
modes. The 8085 has the following five types of addressing:
I. immediate addressing
II. Memory direct addressing
III. Register direct addressing
IV. Indirect addressing
V. Implicit addressing
Immediate Addressing:
• In this mode, the operand given in the instruction - a byte or
word – transfers to the destination register or memory location.
Ex: MVI A, 9AH
The operand is a part of the instruction.
The operand is stored in the register mentioned in the instruction.
Memory Direct Addressing:
• Memory direct addressing moves a byte or word between a memory
location and register. The memory location address is given in the
instruction.
Ex: LDA 850FH
This instruction is used to load the content of memory address 850FH in the
accumulator.
Register Direct Addressing
• Register direct addressing transfer a copy of a byte or word from
source register to destination register.
Ex: MOV B, C
It copies the content of register C to register B.
Indirect Addressing:
• Indirect addressing transfers a byte or word between a register and a
memory location.
Ex: MOV A, M
Here the data is in the memory location pointed to by the contents of
HL pair. The data is moved to the accumulator.
Implicit Addressing
• In this addressing mode the data itself specifies the data to be
operated upon.
Ex: CMA
The instruction complements the content of the accumulator. No
specific data or operand is mentioned in the instruction.
5 group of instructions in 8085 up
• Data transfer instructions
• Arithmetic instructions
• Logical instructions
• Branching instructions
• I/O & machine control instructions
DATA TRANSFER INSTRUCTION
• MOV B,C MOV B, M • PUSH B or PUSH A
• MVI B, 57 MVI M, 57 • POP H or POP A
• LDA 2034 LDA XYZ • OUT 87
• LDAX LDAX B • IN 82
• LXI H, 2034
• LHLD 2040
• STA 4350 STA XYZ
• STAX B
• XCHG NONE (Hand L with D and E)
Arithmetic Instructions:
• ADD B OR ADD M
• ADC B OR ADC M
• ADI 45
• ACI 45
• DAD H
• SUB B OR SUB M
• SUBB B OR SUBB M
• SUI 45
• SBI 45
• INCR B OR INR M
• INX H
• DCR B OR DCR M
• DCX H
• DAA
Logical instructions
• ANA R CMP R
• ANA M CMP M
• ANI 8BIT DATA CPI 8BIT
• ORA R DATA
• ORA M CMA
• ORI 8BIT DATA CMC
• XRA R STC
RLC
• XRA
RRC
• XRA 8BIT DATA
BRANCHING INSTRUCTIONS
• JMP 2034
• JZ
• JC
• JP
• JPO
I/O and machine control instructions
• OUT 50H
• IN 80H
• NOP
• HLT
• DI
• EI
• RIM
• SIM
INSTRUCTION EXECUTION AND TIMING DIAGRAM:
• Each instruction in 8085 microprocessor consists of two part- operation
code (opcode) and operand. The opcode is a command such as ADD
and the operand is an object to be operated on, such as a byte or the
content of a register.

• Instruction Cycle: The time taken by the processor to complete the


execution of an instruction. An instruction cycle consists of one to six
machine cycles.

• Machine Cycle: The time required to complete one operation; accessing


either the memory or I/O device. A machine cycle consists of three to six T-
states.
• T-State: Time corresponding to one clock period. It is the basic unit to
calculate execution of instructions or programs in a processor.
To execute a program, 8085 performs various
operations as
• Opcode fetch
• Operand fetch
• Memory read/write
• I/O read/write
External communication functions are:
• Memory read/write
• I/O read/write
• Interrupt request acknowledge
Assembly language programming for 8085up

You might also like