MP and MALP Notes 8085
MP and MALP Notes 8085
MP and MALP Notes 8085
INTRODUCTION TO MICROPROCESSORS
MICROPROCESSORS
• A Microprocessor is a multipurpose, Programmable clock-driven, register based
electronic device that read binary instruction from a storage device called memory,
accepts binary data as input and processes data according to those instructions and
provides results as outputs.
• A Microprocessor is a clock driven semiconductor device consisting of electronic
circuits manufactured by using either a LSI or VLSI technique.
• A typical programmable machine can be represented with three components : MPU,
Memory and I/O as shown in Figure
Memory
Microprocessor
I/O
• These three components work together or interact with each other to perform a given
task; thus they comprise a system
• The machine (system) represented in above figure can be programmed to turn traffic
lights on and off, compute mathematical functions, or keep trace of guidance system.
• This system may be simple or sophisticated, depending on its applications.
• The MPU applications are classified primarily in two categories : reprogrammable
systems and embedded systems
• In reprogrammable systems, such as Microcomputers, the MPU is used for computing
and data processing.
• In embedded systems, the microprocessor is a part of a final product and is not
available for reprogramming to end user.
MICROCOMPUTER
MICRO CONTROLLER
APPLICATIONS OF MICROPROCESSOR
• Microcomputers
• Industrial Control
• Robotics
• Traffic Lights
• Washing Machines
• Microwave Oven
• Security Systems
• On Board Systems
Microprocessor Microcontroller
Memory
4040
Introduced in 1974
4-bit microprocessor
3,000 transistors were used
Clock speed was 740 KHz
Interrupt features were available
8 Bit Microprocessors
8008
Introduced in 1972 it was first 8 bit microprocessor
Its clock speed was 500 KHz
Could execute 50,000 instruction per second
Used in: Computer terminals, Calculator, Bottling Machines, industrial Robots
8080
Introduced in 1974
It was also 8-bit microprocessor
Its clock speed was 2 MHz
It has 6,000 transistors
10 times faster than 8008
Could execute 500,000 instructions per second
Used In: Calculators, Industrial Robots
8085
Introduced in 1976
It was also 8-bit microprocessor
Its clock speed was 3 MHz
Its data bus is 8 bit and address bus is 16 bit
It has 6,500 transistors
It could execute 769,230 instructions per second
It could access 64KB of memory
It has 246 instructions
Used In: early PC, On-Board Instrument Data Processors
8088
Introduced in 1979
It was also 16-bit microprocessor
It was creates as cheaper version of Intel’s 8086
16-bit processor with an 8-bit data bus
Could execute 2.5 million instructions per second
The chip become the most popular in the computer industry when IBM used it for its first PC
80286
Introduced in 1982
It was 16-bit microprocessor
Its clock speed was 8 MHz
Data bus is 16-bit and address bus is 24-bit
Could address 16 MB of memory
It has 134,000 transistors
Could execute 4-million instructions per second
32 Bit Microprocessors
80386
Introduced in 1986
First 32-bit microprocessor
Data bus is 32 bit and address bus is 32-bit
It could address 4GB of memory
It has 275,000 transistors
Clock speed varied from 16 MHz to 33 MHz depending upon different versions
Different Versions
80386DX
80386SX
80386SL
80486
Introduced in 1989
32-bit microprocessor
Had 1.2 million transistors
Clock speed varied from 16 MHz to 100 MHz depending upon the various versions
It had five different versions
80486DX
80486SX
80486DX2
80486SL
80486DX4
8KB of cache memory was introduced
Prepared By: Mr. Mahesh Neupane Page 5
Pentium
Introduced in 1993
It was also 32-bit microprocessor
Clock speed was 66 MHz
Data bus is 32-bit and address bus is 32-bit
Could address 4GB of memory
Could execute 110 million instructions per second
Cache memory
8KB for Instruction
8KB for data
Upgraded Version: Pentium Pro
Pentium II
Introduced in 1997
32-bit microprocessor
Clock speed was 233 to 450 MHz
MMX technology was supported
L2 cache and processor were on one circuit
Upgraded Version: Pentium II Xenon
Pentium III
Introduced in 1999
It was 32-bit microprocessor
Clock speed varied from 500 MHz to 1.4 GHz
It had 9.5 million transistors
Pentium IV
Introduced in 2000
32-bit microprocessor
Clock speed was from 1.3 GHz to 3.8 GHz
L1 cache was 32 KB and L2 cache was 256 KB
It had 42 million transistors
Intel Dual Core
Introduced in 2006
It is 32-bit or 64 bit Microprocessor
It has 2-cores
Both cores have their own internal bus and L1 cache but share the external bus and L2 cache
Support SMT (Simultaneously Multithreading Technology)
64 Bit Microprocessors
Intel Core 2
Introduced in 2006
64-bit microprocessor
Clock speed is from 1.2 GHz to 3GHz
It has 291 million transistors
L1 cache- 64 KB per core
L2 cache- 4 MB
Versions:
Intel Core 2 Duo
Intel Core 2 Quad
Intel Core 2 Extreme
Intel Core i5
Introduced in 2009
It is a 64-bit microprocessor
It has 4 physical cores
Its clock speed is from 2.40 GHz to 3.60 GHz
It has 781 million transistors
L1 cache- 64 KB per core
L2 cache- 256 KB
L3 cache- 8 MB
Intel Core i3
Introduced in 2010
64-bit microprocessor
It has 2 physical cores
Clock speed is from 2.93 GHz to 3.33 GHz
It has 781 million transistors
L1 cache- 64 KB per core
L2 cache- 512 KB
L3 cache- 4 MB
Intel Core i9
Introduced in 2017
64-bit microprocessor
It has 10 physical cores
Clock speed is from 3.3 GHz to 4.5 GHz
It has around 7 billion transistors
L3 smart cache- 13.75MB
I/O
I/O
The von Neumann architecture allows for one instruction to be read from memory or
data to be read/written from/to memory at a time. In other words, an instruction fetch
and data operation cannot be performed at the same time. Instructions and data are
stored in the same memory subsystem and share a communication pathway or bus to the
CPU. This constraint is referred to as the von Neumann bottleneck and directly impacts
the performance of the system.
The von Neumann bottleneck limits the throughput or data transfer rate between the CPU
and memory. In order to complete most operations, the CPU is required to wait for data.
The bottleneck becomes more of a burden on high-performance systems as memory and
processing speed increases. The Harvard architecture addresses some of these limitations.
2.Data Bus:-8085 Microprocessor has 8 bit data bus. So it can be used to carry the 8 bit data starting from
00000000H (00H) to 11111111H (FFH). Here 'H' tells the Hexadecimal Number. It is bidirectional. These
lines are used for data flowing in both direction means data can be transferred or can be received through
these lines. The data bus also connects the I/O ports and CPU. The largest number that can appear on the
data bus is 11111111.
It has 8 parallel lines of data bus. So it can access upto 2^8 = 256 data bus lines.
3.Control Bus:-The control bus is used for sending control signals to the memory and I/O devices. The
CPU sends control signal on the control bus to enable the outputs of addressed memory devices or I/O
port devices.
8085 INTRODUCTION
The features of INTEL 8085 are:
• It is an 8 bit processor.
• It is a single chip N-MOS device with 40 pins.
• It works on 5 Volt dc power supply.
• The maximum clock frequency is 3 MHz while minimum frequency is 500 KHz.
• It provides 74 instructions with 5 different addressing modes.
• It has multiplexed address and data bus (AD0-AD7).
• It provides 16 address lines so it can access 216 =64K bytes of memory.
• It generates 8 bit I/O address so it can access 28=256 input ports.
ALE: Address latch enable is an output signal. It goes high when operation is started
by processor.
S0, S1: These are the status signals used to indicate type of operation.
RD: Read is active low input signal used to read data from I/O device or memory.
WR: Write is an active low output signal used write data on memory or an I/O device.
RST 5.5, 6.5, 7.5: These are maskable interrupts and have low priority than TRAP.
INTR & INTA: INTR is an interrupt request signal after which µP generates INTA or
interrupt acknowledge signal.
IO/M: This is output pin or signal used to indicate whether 8085 is working in I/O
mode (IO/M=1) or Memory mode (IO/M=0).
HOLD & HLDA: HOLD is an input signal .When µP receives HOLD signal it
completes current machine cycle and stops executing next instruction. In response to
HOLD µP generates HLDA that is HOLD Acknowledge signal.
RESET IN: This is input signal. When RESET IN is low µp restarts and starts
executing from location 0000H.
SID: Serial input data is input pin used to accept serial 1 bit data.
SOD: Serial output data is output pin used to send serial 1 bit data.
X1, X2: These are clock input signals and are connected to external LC or RC circuit.
These are divide by two so if 6 MHz is connected to X1X2, the operating frequency
becomes 3 MHz.
RESTART INTERRUPTS;
These three inputs have the same timing as INTR except they cause an
internal RESTART to be automatically inserted.
RST 7.5 - Highest Priority
RST 6.5
RST 5.5- Lowest Priority
The priority of these interrupts is ordered as shown above. These interrupts have a
higher priority than the INTR.
RST5.5 is a maskable interrupt. When this interrupt is received the processor saves the
contents of the PC register into stack and branches to 2CH (hexadecimal) address.
RST6.5 is a maskable interrupt. When this interrupt is received the processor saves the
contents of the PC register into stack and branches to 34H (hexadecimal) address.
Temporary register:
It is not available for user. All the arithmetic and logical operations are done in the
temporary register but user can’t access it.
Flag Register: It is an 8-bit register which consists of 5 flip flops used to know status
of various operations done.
S Z - AC - P - CY
REGISTER ARRAY
Temporary registers (W, Z): These are not available for user. These are loaded only
when there is an operation being performed.
General purpose: There are six 8-bit general purposes register in 8085 namely B, C,
D, E, H and L. These are used for various data manipulations. They can be used in
pairs as 16-bit registers. The register pairs are: BC pair, DE pair and HL pair. Special
purpose: There are two special purpose registers in 8085:
SP (Stack Pointer): It is a 16-bit register used to hold the address of stack during
stack operation i.e PUSH and POP operations.
PC (Program Counter): It is a 16-bit register which holds the address of next
instruction to be fetched. When a single byte instruction is executed PC is
automatically incremented by 1. Upon reset PC contents are set to 0000H.
INTERRUPT CONTROL
It accepts different interrupts like TRAP, RST 5.5, RST 6.5, RST 7.5 and INTR.
INTA is interrupt acknowledgement signal.
SERIAL IO CONTROL
It is used to accept and send the serial 1 bit data by using SID and SOD signals and it
can be performed by using SIM & RIM instructions.
b) Arithmetic Instructions
Mnemonics Description Example
• The content of register ADD B
ADD R/M /memory (R/M) is added to A←A+B
(add the A and result is stored in A
register/memory) • The memory M is specified ADD M
by HL pair A←A+M
• The content of register ADC B
ADC R/M /memory (R/M) is added to A←A+B+CF
(add with carry) the A along with carry flag
CF and result is stored in A ADC M
• The memory M is specified A←A+M+CF
by HL pair
ADI 8-bit • The 8-bit data is added to A ADI 32H
(add immediate) and result is stored in A A←A+32
ACI 8-bit • The 8-bit data is added to A ACI 32H
c) Logical Instructions
Mnemonics Description Example
CMP R/M • Compares the content of CMP B
(Compare register/memory with A
Register/Memory) • The result of comparison is: CMP M
If A< R/M : Carry Flag CY=1
If A= R/M : Zero Flag Z=1
If A> R/M : Carry Flag CY=0
CPI 8-bit • Compares 8-bit data with A
(Compare • The result of comparison is:
Immediate)
If A< 8-bit : Carry Flag CY=1 CPI 55H
If A= 8-bit : Zero Flag Z=1
If A> 8-bit : Carry Flag CY=0
d) Rotate Instructions
Mnemonics Description Example
RLC • Each bit of A is rotated left by RLC
(Rotate one bit position.
Accumulator Left) • Bit D7 is placed in the
position of D0.
RRC • Each bit of A is rotated right RRC
(Rotate by one bit position.
Accumulator Right) • Bit D0 is placed in the
position of D7.
RAL • Each bit of A is rotated left by RAL
(Rotate one bit position along with
Accumulator Left carry flag CY
with Carry) • Bit D7 is placed in CY and
CY in the position of D0.
RAR • Each bit of A is rotated right RLC
(Rotate by one bit position along with
Accumulator Right carry flag CY.
with Carry) • Bit D7 is placed in CY and
CY in the position of D0.
f) Control Instructions
Mnemonics Description Example
NOP No operation is performed NOP
HLT The CPU finishes executing the HLT
current instruction and stops any
further execution
Machine Cycle: The time taken by the processor to access memory location,
IO ports or to acknowledge an interrupt once is called as machine cycles. It is
the combinations of T-states.