You are on page 1of 34

Chapter 1:Overview of 8085

Microprocessor
1

➢ Intel families of microprocessor intel 4004, 8008


➢ Introduction to 8085 architecture

➢ Instruction set of 8085 and assembly language


programming
➢ Delay calculation for assembly programs

12/11/2018
Introduction to Microprocessor
2

❖ The word Microprocessor is a combination of two words:


➢ micro and processor.
➢ Micro means small.
 In the late 1960’s, processors were built using discrete
elements. But, They were too large and too slow.
 In the early 1970’s the microchip was invented. All of the
components of the processor placed on a single piece of
silicon called Microprocessor
❖ A microprocessor is a multi-purpose, programmable,
integrated logic device that reads binary instructions from a
memory, accepts binary data as input and processes the data
according to those instructions and provides result as an
output
12/11/2018
Introduction to Microprocessor…
3

 Today Intel still has control over the processor market, at least for
PC systems. This means that all PC-compatible systems use either
Intel processors or Intel-compatible processors from a handful of
competitors (such as AMD or Cyrix).
 Intel Invented and delivered the first commercially viable
microprocessor 4004 in 1971.
 The 4004 was not very powerful and all it could do was add and
subtract with 4-bit data only at a time.
 But it was amazing those days that everything was on one chip.
 Prior to the 4004, engineers built computers either from collections
of chips or from discrete components (Transistor wired one at a
time). The machines then, were not portable and were very bulky,
and power hungry.

12/11/2018
Intel families of microprocessors
4

➢ 4004
❖ First Microprocessor, contained 2,300 transistors
❖ Introduced in 1971, 4-bit, 12-address lines(4kbytes), 740 KHz
➢ 8008
❖ 1972, 8-bit, 14-address lines ( 16kb), 500-800 KHz
❖ It contained 3,500 transistors .
➢ 8080
❖ Introduced in April 1974, running at a clock rate of 2MHz.
❖ It had 10 times the performance of the 8008.
❖ The 8080 chip contained 6,000 transistors
❖ 8080 had an 8-bit data bus, it could address up to 64KB of
memory

12/11/2018
Intel families of microprocessors…
5

➢ 8085
❖First8-bit complete functional CPU.
❖ 8085 - 1976, 8-bits, 16-address lines
(64Kb), 3-5 MHz, NMOS, 0.37 MIPS

12/11/2018
Intel families of microprocessors…
6
❖ Limitations of the 8-bit MPs
➢ Low speed of execution
➢ Low memory addressing capability
➢ Limited number of general purpose registers
➢ Less powerful instruction set
➢ No support for pipelining or parallelism.
❖ These limitations led the designers to go for more powerful
processors in terms of:
➢ Advanced architecture
➢ More processing capability
➢ Larger memory addressing capability
➢ More powerful instruction byte queue
❖ The 8086 MP was the result of such developmental design effort.
12/11/2018
Introduction to 8086
7

❖ The 8086, announced in 1978, was the first 16-bit


microprocessor introduced by Intel Corporation.
❖ 8086 and 8088 are internally 16-bit MPs.
❖ Externally the 8086 has a 16-bit data bus and the
8088 has an 8-bit data bus.
❖ 8086 has a 20 bit address bus and it can access up to
220 memory locations ( 1 MB) and 64K of I/O port.
❖ The 8086 is housed in a 40-pin dual inline package
and many pins have multiple functions.
❖ It requires +5V power supply.
12/11/2018
Introduction to 8086
8

 Although the 8086 was a great chip, it was expensive


at the time
 To help bring costs down, in 1979, Intel released a
crippled version of the 8086 called the 8088.
 Generally , the PC market moved from the

8088 →80286 → 80386 → 80486 → Pentium →


Pentium II → Pentium III → Pentium 4.
 All of them are improvements of design base of the
8088.
 The Pentium 4 can execute any piece of code that ran
on the original 8088, but it does it about 5,000 times
faster
12/11/2018
Application areas of microprocessors

❑ Microprocessor is used for monitoring and controlling


electronic devises.
❑ Measuring instruments such as the oscilloscope, multi-meter,
and spectrum analyzer
 Controlling household items such as the microwave oven, door
bell, washing machine, and television.
 Monitoring defense equipments such as missiles and radar
Computers
 Controlling traffic light
 Controlling speed and direction of stepper motor
 Monitoring medical equipment such as blood pressure and
blood analyzer

MU-MIT Oct. 2018


Factors Affecting Microprocessor
performance
10

 Instruction set: some instruction sets are more


efficient that processor do more useful work at a
given speed.
 Clock speed: the speed at which the processor
can execute instructions.
 Bandwidth: determines how much information the
processor can process in one instruction. Current
bandwidth standard 64 bit
 Number of cores: dual core, core i3, i5, i7…more
processing power

12/11/2018
Introduction to 8085 Microprocessor
 Intel 8085 is an 8-bit microprocessor
 It has 8-bit data bus and its arithmetic logic unit and
internal registers use 8-bits
 The 8085 system has 16-bit address, A0 – A15
 It is manufactured with N-MOS technology
 The first 8 lines of address bus and 8 lines of data
bus are multiplexed AD0 – AD7
 Data bus is a group of 8 lines D0 – D7

MU-MIT Oct. 2018


Intro to 8085…
 It supports external interrupt request.
 A 16 bit program counter (PC)
 A 16 bit stack pointer (SP)
 Six 8-bit general purpose register arranged in
pairs: BC, DE, HL
 It is enclosed with 40 pins DIP (Dual in line
package)

MU-MIT Oct. 2018


8085 Pins
13

 A8-A15 (pins 21 – 28)


 AD0-AD7 (pins 12 – 19)
 ALE (pin 30)
 RD (pin 32), WR(31)
 INTR (PIN 10), INTA (PIN 11)

12/11/2018
MU-MIT Oct. 2018
8085 Microprocessor Internal
Architecture
 Internally, the microprocessor is made up of 3 main
units.
✓ The Arithmetic/Logic Unit (ALU)
✓ The Control Unit.

✓ An array of registers
✓ GPRS: six 8 bit, B, C, D, E, H and L. B & C registers can be
used as one 16-bit BC register, can be used as data pointer
E.g HL to refer memory address
✓ SPRS: AC, PC, SP, status registers

MU-MIT Oct. 2018


MU-MIT Oct. 2018
Instruction and Computer Languages

❑ An instruction is a binary pattern entered through


an input device in memory to command the
microprocessor to perform that specific function.
 An instruction can be written in a variety of forms.

their mnemonic codes and symbolic address.


 However, a microprocessor can decode and execute
only binary coded instruction.
 Therefore, for each operation that can be executed
by a microprocessor, there is a binary code.
MU-MIT Oct. 2018
Machine & Assembly Language
Programming
 Programming languages can be broadly categorized in to two
1) Low level programming languages
✓ Are dependent on the underlying architecture of the processor
(Machine dependent).
✓ a program written for 8085 can’t be executed in Motorolla 6800.
✓ Eg: Machine and Assembly languages
2) High level programming languages
✓ Are independent of underlying architecture of the
processor
✓ Easier to understand than assembly languages
✓ Slower and needs higher memory space. Compiler is a tool
for converting a high-level language into machine
language
✓ Eg C, C++, FORTRAN…
MU-MIT Oct. 2018
Machine & Assembly Language
Programming…
 Machine Languages
• It is a language that a computer understands directly with
out any translation
• Machine language is composed only 1’s and 0’s
• It is MP specific
• Eg (for 8085 MP)
To add the contents of register A and register B, the binary code
is 1000 0000

MU-MIT Oct. 2018


Machine & Assembly Language
Programming…
 Assembly Language
• The simplest symbolic language for computers
• In Assembly language program, English like symbolic
code(called mnemonic) are used to represent the binary
code of a machine language
• It is MP specific
• Assembler is used for converting assembly program into
machine code
• Eg (for 8085 MP)
◼ To add the contents of register A and register B, the binary
code is 1000 0000
◼ The equivalent assembly code is ADD B

MU-MIT Oct. 2018


ASSEMBLY LANGUAGE Vs MACHINELANGUAGE

 Assembly language is a human-readable text, and


machine language is machine-readable binary
code.
 To program directly in machine language is tedious,
use assembly language instead, and use an
assembler to produce the actual machine code.

Oct. 2018
Instruction sets of 8085
22

❑ An Instruction is a command given to the computer to perform a specified


operation on given data.
❑ The instruction set of a microprocessor is the collection of the instructions
that the microprocessor is designed to execute.
❑ the 8085 is an 8-bit device it can have up to 28 (256)
instructions.
❑ However, the 8085 only uses 246 combinations that represent a total of
74 instructions. Each instruction has two parts:
❑ one is task to be performed, called the operation code (opcode), the
second is the data to be operated on, called the operand.
❑ The operand (or data) can be specified in various ways. It may include 8-
bit(or 16-bit ) data, an internal register, a memory location, or 8-bit (or 16-
bit) address. In some instructions, the operand is implicit (hidden).

12/11/2018
Operand Types
23

❑ There are different ways for specifying the operand:


❑ There may not be an operand (implied operand)CMA

❑ The operand may be an 8-bit number (immediate


data)ADI4FH

❑ The operand may be an internal register (register)


SUBB

❑ The operand may be a 16-bit address (memory


address)LDA4000H
12/11/2018
Assembly and Machine codes
In the design of the 8085 P chip, all operations, registers, and status
flags are identified with a specific codes.
▪ codes for some operations
▪ Codes for registers Function code
Code Registers 1. RLC 00000111 =07H (8-bit code)
000 B
001 C 2. ADD RS 10000 SSS
010 D (5-bits opcode, 3-bits are for a register)
011 E e.g. ADD : 10000
100 H B : 000
101 L to A : implicit  ADD B
110 … binary instruction 10000000 = 80H
111 A
110 is reserved for memory-related 3. MOV Rd, Rs 01 DDD SSS
operations
op Rd Rs
Code Register pair e.g. MOV : 01
00 BC to C : 001 (DDD)
01 DE from A : 111 (SSS)  MOV C, A
10 HL Binary instruction 01001111 =4FH
11 SP (2-bit opcode, 6-bits are for registers)
8085 instruction Types
25

The 8085 instruction set is functionally grouped as


follows:
1. Data transfer group
2. Arithmetic group
3. Logical group
4. Branch control group
5. Stack, and Machine control group

12/11/2018
Data transfer instructions
26

 MOV r1, r2 ; Move the content of one register to another


 [r1]  [r2]
 e.g. MOV B, A

 2. MOV r, M ; move the content of the memory location,


whose address is in H-L pair into register r. [r]  [ [H-L] ]

 e.g. LXI H, 2000H ; load H-L pair by 2000H


 MOV B, M ; Move the content of the memory location
2000 to B.
 HLT ; Halt

12/11/2018
Arithmetic group instructions
27

 These instructions are: ADD, ADC, ADI, ACI, DAD, SUB, SBB, SUI, INR, DCR, INX, DCX,
DAA
 ADD r ; add the content of register r to ACC. The sum (result) is placed in
ACC.
 [A]  [A] + [r]
 e.g. MVI C, 45H ; load reg C with 45H
 MVI A, 50H ; load reg A with 50H
 ADD C ; add C=45H with A=50H, result is in A=95H
 HLT ; stop

 ADD M ; add memory content to ACC. The result is stored in ACC.


 [A]  [A] + [ [H-L] ]
 - the content of the M.L addressed by H-L pair is added to the content of the ACC. The sum is
stored in ACC.
 e.g. LXI H, 2400H
 MVI A, 20H
 ADD M ; add memory content to ACC.
 HLT ; stop
12/11/2018
16 bit Addition(Example)
28

 Write an 8085 assembly language program to add


two 16 bits numbers in locations 4096H and 4097H
with another 16 bit number stored in 5010H and
5011H. Store your result in BC.
 Assume:
 Num1 is stored in 4096H & 4097H
 Num2 is stored in 5010H and 5011H
Solution
29

 LDA 4096H; load low byte of Num1


 LXI H, 5010H; load address of low byte of Num2
 ADD M
 MOV C, A; store low byte result in C
 LDA 4097H; load high byte of Num1
 INX H
 ADC M
 MOV B, A; store high Byte result in Reg B
 HLT
30
Delay calculation for assembly programs
 Each instruction passes through different combinations
of Fetch, Memory Read, and Memory Write cycles.
 Knowing the combinations of cycles, one can calculate
how long such an instruction would require to
complete.
 The time required to execute each instruction is
referred as T-states or Clock periods
 Clock Period (T) =1/clock frequency of a system.
 Each instruction has its own T-states (Clock Periods).
 The amount of time is not constant. It varies from instruction to
instruction
 Delay = No. of T-States / Frequency

12/11/2018
Delay for Opcode fetch machine cycle
31
Memory read machine cycle
32
34
Examples
1. Calculate the time required to execute MVI
instruction on 8085-based microcomputer. The
instruction MVI requires 7 T-states.
Solution
 Given: Clock frequency of the system= 3MHz

 T-states (Clock periods) = 7

 T=1/3 MHz=0.33μ seconds

 Time to execute MVI= 7*0.33μ second= 2.31μ

seconds
Dec 2014 Mpr 8085

You might also like