SlideShare a Scribd company logo
Course Name: Microprocessor
Architecture
B. Sc. (Information Technology)
Semester – II
MICROPROCESSOR 8085
• Reference Book:Ramesh S. Goankar,
“Microprocessor Architecture, Programming and
Applications with 8085”, 5thEdition, Prentice Hall.
• Computer System Architecture- M. Morris Mano
• Structured Computer Organization- Andrew C.
Tanenbaum
Unit-I
• Microprocessor, microcomputers, and Assembly Language:
• Microprocessor, Microprocessor Instruction Set and Computer
Languages, From Large Computers to Single-Chip Microcontrollers,
Applications.
• Microprocessor Architecture and Microcomputer System:
• Microprocessor Architecture and its operation’s, Memory, I/O
Devices, Microcomputer System, Logic Devices and Interfacing,
Microprocessor-Based System Application.
• 8085 Microprocessor Architecture and Memory Interface:
• Introduction, 8085 Microprocessor unit, 8085-Based
Microcomputer, Memory Interfacing, Interfacing the 8155 Memory
Segment, Illustrative Example: Designing Memory for the MCTS
Project, Testing and Troubleshooting Memory Interfacing Circuit,
8085-Based Single-Board microcomputer.
Details..of Unit-I
• Basic Concepts of Microprocessors.
• Differences among
I. Microcomputer
II. Microprocessor
III. Microcontroller
• What about micro
• Definition of the Microprocessor
Definition ..
• The earliest microprocessor (the Intel 8088
and Motorola’s 6800) recognized 8-bit words.
• Later microprocessors (8086 and 68000) were
designed with 16-bit words.
• Today, all processors manipulate at least 32
bits at a time and there exists microprocessors
that can process 64, 80, 128 bits
A Microprocessor-based system
• Internally, the microprocessor is made up of 3
main units.
• The Arithmetic/Logic Unit (ALU)
• The Control Unit.
• An array of registers for holding data while it is
being manipulated.
Architecture of Intel 8085
Microprocessor
Memory
• Memory Map and Addresses.
• The three cycle instruction execution model.
To execute a program, the microprocessor “reads” each
instruction from memory, “interprets” it, then
“executes” it.
(Fetches/Decode/Execute)
• Machine Language.
• The 8085 Machine Language
• Assembly Language
Defines a symbolic code for the instructions.
“mnemonics”.
8085 Microprocessor Architecture
• 8-bit general purpose μp
• Capable of addressing 64 k of memory
• Has 40 pins
• Requires +5 v power supply
• Can operate with 3 MHz clock
• 8085 upward compatible
8085 MicroprocessorArchitecture..
System Bus –wires connecting memory & I/O to
microprocessor
– Address Bus Unidirectional
Identifying peripheral or memory location
– Data Bus Bidirectional
Transferring data
– Control Bus
Synchronization signals
Timing signals
Control signal
Intel 8085 Microprocessor..
Microprocessor consists of:
• Control unit: Control microprocessor operations.
• ALU: performs data processing function.
• Registers: provide storage internal to CPU.
• Interrupts
• Internal data bus
The Internal Architecture
• The Program Counter (PC):
-Control the sequencing of the execution of
instructions.
• The Stack pointer:
-The stack pointer is also a 16-bit register that
is used to point into memory.
-LIFO
Unit-II
Introduction to 8085 Assembly Language Programming:
– The 8085 Programming Model
– Instruction Classification
– Instruction
– Data and Storage
– Writing assembling and Execution of a simple program
– Overview of 8085 Instruction Set
– Writing and Assembling Program
Instruction and Data Formats
Each instruction has two parts.
– The first part is the task or operation to be
performed. This part is called the “opcode” (operation
code).
– The second part is the data to be operated on
Called the “operand”.
The 8085 Instructions
• Data Transfer Operations
(MOV, MVI, LDA, and STA)
• Arithmetic Operations
(ADD, ADI, SUB, SUI)
Arithmetic Operations Related to Memory
• Logic Operations:
(ANA, ANI, ORA, ORI, XRA and XRI,
Complement, Rotate,Compare)
The 8085 Instructions…
• MOV M B:
Copy the data from register B into a memory location.
• LDAX Rp (LoaD Accumulator eXtended)
• LXI Rp, <16-bit address>(Load eXtended
Immediate)
• The instruction LXI B 4000Hwill place the 16-
bit number 4000 into the register pair B, C.
The 8085 Instructions…
Operation: Load an 8-bit number into the
accumulator.
MVI A, 32
-Operation: MVI A
– Operand: The number 32
– Binary Code:
• 0011 11103E 1st byte.
• 0011 001032 2nd byte.
The 8085 Instructions..
• Branch Operations:
–Two types: Unconditional branch. Go to a
new location no matter what. (JMP, CALL, RET)
–Conditional branch. Go to a new location if the
condition is true. (JZ, JNZ, JC, JNC, JP, JM)
The 8085 Instructions..
• Machine Control Operations
HLT--Stop executing the program.
NOP--No operation
Unit - III
• Programming Techniques With Additional Instructions:
– Programming Techniques:
• Looping, Counting and Indexing
– Additional Data Transfer and 16-Bit Arithmetic Instructions
– Arithmetic Instruction Related to Memory
– Logic Operations:
• Rotate
• Compare
• Dynamic Debugging
Unit - III
• Counters and Time Delays:
– Counters and Time Delays
– Generating Pulse Waveforms
– Debugging Counter and Time-Delay Programs
Counters & Time Delays
• A loop counter is set up by loading a register
with a certain value.
• using the DCR (to decrement) and INR (to
increment) the contents of the register are
updated.
• Sample ALP for implementing a loop using INR
or DCR
• Sample program Using a Register Pair as a
Loop Counter
Delays
• Sample program can use a loop to produce a
certain amount of time delay in a program.
• Nested loops can be easily setup in Assembly
language by using two registers for the two
loop counters.
• Nested Loops for Delay.
• Delay Calculation of Nested Loops
– inner loop, outer loop
– Increasing the delay
Timing Diagram
Following Buses and Control Signals must be
shown in a Timing Diagram:
• Higher Order Address Bus.
• Lower Address/Data bus
• ALE
• RD
• WR
• IO/M
Timing Diagram..continued
• Op-Code Fetch Cycle
• Memory Read Cycle
• Memory Write Cycle
Stack and Subroutines
• The stack is an area of memory identified by the
programmer for temporary storage of
information.
• The stack is a LIFO structure.
• The stack normally grows backwards into
memory.
• The programmer defines the bottom of the stack
and the stack grows up into reducing address
range.
Stack and Subroutines..
• In the 8085, the stack is defined by setting the
SP (Stack Pointer) register.
LXI SP, FFFFH
• Saving Information on the Stack
• The 8085 provides two instructions: PUSH and
POP for storing information on the stack and
retrieving it back.
• Operation of the Stack
Stack and Subroutines..
• During pushing, the stack operates in a
“decrement then store” style.
• During poping, the stack operates in a “use
then increment” style.
• The SP pointer always points to “the top of the
stack”.
• The PSW Register Pair
Subroutines
• A subroutine is a group of instructions that
will be used repeatedly indifferent locations of
the program.
• The 8085 has two instructions for dealing with
subroutines.
• The CALL instruction is used to redirect
program execution to the subroutine.
• The RTE insutruction is used to return the
execution to the calling routine.
Subroutines..
• Passing Data to a Subroutine.
• Call by Reference and Call by Value.
• Conditional CALL and RTE Instructions.
CC, call subroutine if Carry flag is set.
CNC, call subroutine if Carry flag is not set
RC, return from subroutine if Carry flag is set
RNC, return from subroutine if Carry flag is not set
Interrupts
• Interrupt is a process where an external device
can get the attention of the microprocessor.
-The process starts from the I/O device
–The process is asynchronous.
• Interrupts can be classified into two types:
Maskable(can be delayed)
Non-Maskable(can not be delayed)
Interrupts..
• The 8085 has 5 interrupt inputs.
• Interrupt name Maskable Vectored
INTR Yes No
RST 5.5 Yes Yes
RST 6.5 Yes Yes
RST 7.5 Yes Yes
TRAP No Yes
• Interrupt Vectors and the Vector Table
Interrupts..
• The Priority Encoder
• Multiple Interrupts & Priorities
• The 8085 Maskable/Vectored Interrupts.
• The 8085 Maskable/Vectored Interrupt
Process.
• Manipulating the Masks
Practicals..
• 1. Perform the following Operations related to memory locations.
• a. Store the data byte 32H into memory location 4000H.
• b. Exchange the contents of memory locations 2000H and 4000H
• 2. Simple assembly language programs.
• a. Subtract the contents of memory location 4001H from the memory location 2000H
and place the result in memory location 4002H.
• b. Subtract two 8-bit numbers.
• c. Add the 16-bit number in memory locations 4000H and 4001H to the 16-bit number in
memory locations 4002H and 4003H. The most significant eight bits of the two numbers to
be added are in memory locations 4001H and 4003H. Store the result in memory locations
4004H and 4005H with the most significant byte in memory location 4005H.
• d. Add the contents of memory locations 40001H and 4001H and place the result in the
memory locations 4002Hand 4003H.
• e. Subtract the 16-bit number in memory locations 4002H and 4003H from the 16-bit
number in memory locations 4000H and 4001H. The most significant eight bits of the two
numbers are in memory locations 4001H and 4003H. Store the result in memory locations
4004H and 4005H with the most significant byte in memory location 4005H.
• f. Find the l's complement of the number stored at memory location 4400H and store
the complemented number at memory location 4300H.
Practicals..
• 3. Packing and unpacking operations.
• a. Pack the two unpacked BCD numbers stored in
memory locations 4200H and 4201H and store result in
memory location 4300H. Assume the least significant
digit is stored at 4200H.
• b. Two digit BCD number is stored in memory
location 4200H. Unpack the BCD number and store the
two digits in memory locations 4300H and 4301H such
that memory location 4300H will have lower BCD digit.
Practicals..
• 4. Register Operations.
• a. Write a program to shift an eight bit data four bits
right. Assume that data is in register C.
• b. Program to shift a 16-bit data 1 bit left. Assume data is
in the HL register pair
• c. Write a set of instructions to alter the contents of flag
register in 8085.
• d. Write a program to count number of l's in the contents
of D register and store the count in the B register.
Practicals..
• 5. Multiple memory locations.
• a. Calculate the sum of series of numbers. The length of the series is in
memory location 4200H and the series begins from memory location
4201H. a. Consider the sum to be 8 bit number. So, ignore carries. Store
the sum at memory location 4300H. b. Consider the sum to be 16 bit
number. Store the sum at memory locations 4300H and 4301H
• b. Multiply two 8-bit numbers stored in memory locations 2200H and
2201H by repetitive addition and store the result in memory locations
2300H and 2301H.
• c. Divide 16 bit number stored in memory locations 2200H and 2201H
by the 8 bit number stored at memory location 2202H. Store the quotient
in memory locations 2300H and 2301H and remainder in memory
locations 2302H and 2303H.
Practicals..
• d. Find the number of negative elements (most
significant bit 1) in a block of data. The length of the
block is in memory location 2200H and the block itself
begins in memory location 2201H. Store the number of
negative elements in memory location 2300H
• e. Find the largest number in a block of data. The
length of the block is in memory location 2200H and
the block itself starts from memory location 2201H.
Store the maximum number in memory location
2300H. Assume that the numbers in the block are all 8
bit unsigned binary numbers.
Practicals..
• 6. Calculations with respect to memory locations.
• a. Write a program to sort given 10 numbers from memory location
2200H in the ascending order.
• b. Calculate the sum of series of even numbers from the list of
numbers. The length of the list is in memory location 2200H and the series
itself begins from memory location 2201H. Assume the sum to be 8 bit
number so you can ignore carries and store the sum at memory location
2Sample problem:
• c. Calculate the sum of series of odd numbers from the list of numbers.
The length of the list is in memory location 2200H and the series itself
begins from memory location 2201H. Assume the sum to be 16-bit. Store
the sum at memory locations 2300H and 2301H.
Practicals..
d. Find the square of the given numbers from memory location 6100H and store the
result from memory location 7000H
• e. Search the given byte in the list of 50 numbers stored in the consecutive
memory locations and store the address of memory location in the memory
locations 2200H and 2201H. Assume byte is in the C register and starting address
of the list is 2000H. If byte is not found store 00 at 2200H and 2201H
• f. Two decimal numbers six digits each, are stored in BCD package form. Each
number occupies a sequence of byte in the memory. The starting address of first
number is 6000H Write an assembly language program that adds these two
numbers and stores the sum in the same format starting from memory location
6200H
• g. Add 2 arrays having ten 8-bit numbers each and generate a third array of
result. It is necessary to add the first element of array 1 with the first element of
array-2 and so on. The starting addresses of array l, array2 and array3 are 2200H,
2300H and 2400H, respectively
Practicals..
7. Assembly programs on memory locations.
a. Write an assembly language program to separate even
numbers from the given list of 50 numbers and store them
in the another list starting from 2300H. Assume starting
address of 50 number list is 2200H.
b. A list of 50 numbers is stored in memory, starting at
6000H. Find number of negative, zero and positive
numbers from this list and store these results in memory
locations 7000H, 7001H, and 7002H respectively
b. Program to calculate the factorial of a number between 0
to 8.
Practicals..
8. String operations in assembly programs.
• Multiply the 8-bit unsigned number in memory location 2200H by
the 8-bit unsigned number in memory location 2201H. Store the 8
least significant bits of the result in memory location 2300H and the
8 most significant bits in memory location 2301H.
• Divide the 16-bit unsigned number in memory locations 2200H and
2201H (most significant bits in 2201H) by the B-bit unsigned
number in memory location 2300H store the quotient in memory
location 2400H and remainder in 2401H
•
• DAA instruction is not present. Write a sub routine which will
perform the same task as DAA.
•
Practicals..
• Calculations on memory locations.
• Arrange an array of 8 bit unsigned no in descending
order
• Transfer ten bytes of data from one memory to another
memory block. Source memory block starts from
memory location 2200H where as destination memory
block starts from memory location 2300H
• Write a simple program to Split a HEX data into two
nibbles and store it in memory
Practicals..
• 10. Operations on BCD numbers.
• a. Add two 4 digit BCD numbers in HL and DE register
pairs and store result in memory locations, 2300H and
2301H. Ignore carry after 16 bit.
• b. Subtract the BCD number stored in E register from
the number stored in the D register
• c. Write an assembly language program to multiply 2
BCD numbers
Thank you
Ad

Recommended

8085 microprocessor(1)
8085 microprocessor(1)
Reevu Pal
 
Architecture of 8085
Architecture of 8085
Sumit Swain
 
MICROPROCESSORS AND MICROCONTROLLERS
MICROPROCESSORS AND MICROCONTROLLERS
selvakumar948
 
UNIT II MICROPROCESSOR AND MICROCONTROLLER
UNIT II MICROPROCESSOR AND MICROCONTROLLER
ravis205084
 
Assembly Language Programming Of 8085
Assembly Language Programming Of 8085
techbed
 
Unit 2.ppt
Unit 2.ppt
sharonmarishkawilfre
 
Assemblylanguageprogrammingof8085 100523023329-phpapp02
Assemblylanguageprogrammingof8085 100523023329-phpapp02
Swati Watve-Phadke
 
Malp edusat
Malp edusat
karthikrelax
 
8085 MICROPROCESSOR.pptx
8085 MICROPROCESSOR.pptx
karthik R
 
UNIT II –8085 MICROPROCESSOR AND 8051 MICROCONTROLLER---ME6702– MECHATRONICS
UNIT II –8085 MICROPROCESSOR AND 8051 MICROCONTROLLER---ME6702– MECHATRONICS
Mohanumar S
 
20ME702– MECHATRONICS -UNIT-2.pptx
20ME702– MECHATRONICS -UNIT-2.pptx
Mohanumar S
 
Lec03
Lec03
siddu kadiwal
 
UNIT 2-8085 MICROPROCESSOR AND 8051 MICROCONTROLLER.pdf
UNIT 2-8085 MICROPROCESSOR AND 8051 MICROCONTROLLER.pdf
Chandra Kumar S
 
Pdemodule 4
Pdemodule 4
neerajtcr1990
 
MECHATRONICS-UNIT 2-8085 MICROPROCESSOR AND 8051 MICROCONTROLLER .pptx
MECHATRONICS-UNIT 2-8085 MICROPROCESSOR AND 8051 MICROCONTROLLER .pptx
CHANDRA KUMAR S
 
Programming with 8085-Microprocessor and interfacing
Programming with 8085-Microprocessor and interfacing
Amitabh Shukla
 
PPT 8085 microprocessor
PPT 8085 microprocessor
Ardhendupanja
 
MicroprocessorLecture_2_eightbit_microprocessor.ppt
MicroprocessorLecture_2_eightbit_microprocessor.ppt
BijitKumarDas
 
8085_Microprocessor(simar).ppt
8085_Microprocessor(simar).ppt
KanikaJindal9
 
Programming with 8085
Programming with 8085
Shehrevar Davierwala
 
Architecture of the 8085 and its registers.pptx
Architecture of the 8085 and its registers.pptx
shalinaevanglin
 
8085 microprocessor Embedded system
8085 microprocessor Embedded system
Sofcon India Pvt Ltd.
 
8085 microprocessor
8085 microprocessor
GurleenKaur408
 
8085 Microprocessor Architecture
8085 Microprocessor Architecture
deval patel
 
Microprocessor and its applications third edition
Microprocessor and its applications third edition
Rizwan Ahmed
 
Question bank malp 3340302
Question bank malp 3340302
SHAH JAINAM
 
microprocessor8085pptcomplete-170518063501 (1).pdf
microprocessor8085pptcomplete-170518063501 (1).pdf
kavithavm
 
Microprocessor 8085 complete
Microprocessor 8085 complete
Shubham Singh
 
szza009 (1).pdfdsrgggsdggggggggggggggggggggggg
szza009 (1).pdfdsrgggsdggggggggggggggggggggggg
ath67927
 
AKnosiahsfnlkasndlakwfbklasndlakbwlfkslgab
AKnosiahsfnlkasndlakwfbklasndlakbwlfkslgab
Meiteguhf
 

More Related Content

Similar to microprocessor MICROPROCESSOR 8085 MICROPROCESSOR 8085 (20)

8085 MICROPROCESSOR.pptx
8085 MICROPROCESSOR.pptx
karthik R
 
UNIT II –8085 MICROPROCESSOR AND 8051 MICROCONTROLLER---ME6702– MECHATRONICS
UNIT II –8085 MICROPROCESSOR AND 8051 MICROCONTROLLER---ME6702– MECHATRONICS
Mohanumar S
 
20ME702– MECHATRONICS -UNIT-2.pptx
20ME702– MECHATRONICS -UNIT-2.pptx
Mohanumar S
 
Lec03
Lec03
siddu kadiwal
 
UNIT 2-8085 MICROPROCESSOR AND 8051 MICROCONTROLLER.pdf
UNIT 2-8085 MICROPROCESSOR AND 8051 MICROCONTROLLER.pdf
Chandra Kumar S
 
Pdemodule 4
Pdemodule 4
neerajtcr1990
 
MECHATRONICS-UNIT 2-8085 MICROPROCESSOR AND 8051 MICROCONTROLLER .pptx
MECHATRONICS-UNIT 2-8085 MICROPROCESSOR AND 8051 MICROCONTROLLER .pptx
CHANDRA KUMAR S
 
Programming with 8085-Microprocessor and interfacing
Programming with 8085-Microprocessor and interfacing
Amitabh Shukla
 
PPT 8085 microprocessor
PPT 8085 microprocessor
Ardhendupanja
 
MicroprocessorLecture_2_eightbit_microprocessor.ppt
MicroprocessorLecture_2_eightbit_microprocessor.ppt
BijitKumarDas
 
8085_Microprocessor(simar).ppt
8085_Microprocessor(simar).ppt
KanikaJindal9
 
Programming with 8085
Programming with 8085
Shehrevar Davierwala
 
Architecture of the 8085 and its registers.pptx
Architecture of the 8085 and its registers.pptx
shalinaevanglin
 
8085 microprocessor Embedded system
8085 microprocessor Embedded system
Sofcon India Pvt Ltd.
 
8085 microprocessor
8085 microprocessor
GurleenKaur408
 
8085 Microprocessor Architecture
8085 Microprocessor Architecture
deval patel
 
Microprocessor and its applications third edition
Microprocessor and its applications third edition
Rizwan Ahmed
 
Question bank malp 3340302
Question bank malp 3340302
SHAH JAINAM
 
microprocessor8085pptcomplete-170518063501 (1).pdf
microprocessor8085pptcomplete-170518063501 (1).pdf
kavithavm
 
Microprocessor 8085 complete
Microprocessor 8085 complete
Shubham Singh
 
8085 MICROPROCESSOR.pptx
8085 MICROPROCESSOR.pptx
karthik R
 
UNIT II –8085 MICROPROCESSOR AND 8051 MICROCONTROLLER---ME6702– MECHATRONICS
UNIT II –8085 MICROPROCESSOR AND 8051 MICROCONTROLLER---ME6702– MECHATRONICS
Mohanumar S
 
20ME702– MECHATRONICS -UNIT-2.pptx
20ME702– MECHATRONICS -UNIT-2.pptx
Mohanumar S
 
UNIT 2-8085 MICROPROCESSOR AND 8051 MICROCONTROLLER.pdf
UNIT 2-8085 MICROPROCESSOR AND 8051 MICROCONTROLLER.pdf
Chandra Kumar S
 
MECHATRONICS-UNIT 2-8085 MICROPROCESSOR AND 8051 MICROCONTROLLER .pptx
MECHATRONICS-UNIT 2-8085 MICROPROCESSOR AND 8051 MICROCONTROLLER .pptx
CHANDRA KUMAR S
 
Programming with 8085-Microprocessor and interfacing
Programming with 8085-Microprocessor and interfacing
Amitabh Shukla
 
PPT 8085 microprocessor
PPT 8085 microprocessor
Ardhendupanja
 
MicroprocessorLecture_2_eightbit_microprocessor.ppt
MicroprocessorLecture_2_eightbit_microprocessor.ppt
BijitKumarDas
 
8085_Microprocessor(simar).ppt
8085_Microprocessor(simar).ppt
KanikaJindal9
 
Architecture of the 8085 and its registers.pptx
Architecture of the 8085 and its registers.pptx
shalinaevanglin
 
8085 Microprocessor Architecture
8085 Microprocessor Architecture
deval patel
 
Microprocessor and its applications third edition
Microprocessor and its applications third edition
Rizwan Ahmed
 
Question bank malp 3340302
Question bank malp 3340302
SHAH JAINAM
 
microprocessor8085pptcomplete-170518063501 (1).pdf
microprocessor8085pptcomplete-170518063501 (1).pdf
kavithavm
 
Microprocessor 8085 complete
Microprocessor 8085 complete
Shubham Singh
 

Recently uploaded (20)

szza009 (1).pdfdsrgggsdggggggggggggggggggggggg
szza009 (1).pdfdsrgggsdggggggggggggggggggggggg
ath67927
 
AKnosiahsfnlkasndlakwfbklasndlakbwlfkslgab
AKnosiahsfnlkasndlakwfbklasndlakbwlfkslgab
Meiteguhf
 
Rolph Balgobin - The Different Types of Entrepreneur
Rolph Balgobin - The Different Types of Entrepreneur
Rolph Balgobin
 
Biography and career history of Dr. Gabriel Carabello
Biography and career history of Dr. Gabriel Carabello
Dr. Gabriel Carabello
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaDigital-Literac...
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaDigital-Literac...
RoyCerbasPaderes
 
Untitled.pdf of mastering your offer to u
Untitled.pdf of mastering your offer to u
ArponSaha8
 
Behavioral Skills / Employability Skills
Behavioral Skills / Employability Skills
bonophool banerjee
 
PRESENTATION general mathematicsppt.pptx
PRESENTATION general mathematicsppt.pptx
DharylBallarta
 
From reducing flood risks to conserving water
From reducing flood risks to conserving water
Ali Ata
 
ai er make you happy ander The shor of morning.pptx
ai er make you happy ander The shor of morning.pptx
sartusorde
 
Quarter 3 Program Implementation Review and Performance Assessment
Quarter 3 Program Implementation Review and Performance Assessment
LaMariaAngelicaPunay
 
一比一原版(SFSU毕业证)旧金山州立大学毕业证如何办理
一比一原版(SFSU毕业证)旧金山州立大学毕业证如何办理
taqyed
 
NCC_Enrollment_Visual_Presenatation.pptx
NCC_Enrollment_Visual_Presenatation.pptx
19sharmalalit
 
TECHNOLOGY LIVELIHOOD EDUCATIONLESSON EXEMPLAR
TECHNOLOGY LIVELIHOOD EDUCATIONLESSON EXEMPLAR
AnnMargrettDuka
 
Power BI Jobs in Jaipur Your Gateway to Data Analytics Careers in Rajasthan.pdf
Power BI Jobs in Jaipur Your Gateway to Data Analytics Careers in Rajasthan.pdf
vinay salarite
 
一比一原版(LTU毕业证)利兹三一大学毕业证如何办理
一比一原版(LTU毕业证)利兹三一大学毕业证如何办理
Taqyea
 
Nsqf vhse admission career guidance kerala
Nsqf vhse admission career guidance kerala
anjaliparvathy2000
 
PHYSICAL EDUCATION AND HEALTH POWERPOINT
PHYSICAL EDUCATION AND HEALTH POWERPOINT
aguilarena08
 
S Pomeroy - Resume - Financial Leadership Role ATSV2 (06 13 25).pdf
S Pomeroy - Resume - Financial Leadership Role ATSV2 (06 13 25).pdf
ndhsshare1
 
climate_change_global_action_and_local_responsibility_xev18307.pptx
climate_change_global_action_and_local_responsibility_xev18307.pptx
hamdeyadd
 
szza009 (1).pdfdsrgggsdggggggggggggggggggggggg
szza009 (1).pdfdsrgggsdggggggggggggggggggggggg
ath67927
 
AKnosiahsfnlkasndlakwfbklasndlakbwlfkslgab
AKnosiahsfnlkasndlakwfbklasndlakbwlfkslgab
Meiteguhf
 
Rolph Balgobin - The Different Types of Entrepreneur
Rolph Balgobin - The Different Types of Entrepreneur
Rolph Balgobin
 
Biography and career history of Dr. Gabriel Carabello
Biography and career history of Dr. Gabriel Carabello
Dr. Gabriel Carabello
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaDigital-Literac...
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaDigital-Literac...
RoyCerbasPaderes
 
Untitled.pdf of mastering your offer to u
Untitled.pdf of mastering your offer to u
ArponSaha8
 
Behavioral Skills / Employability Skills
Behavioral Skills / Employability Skills
bonophool banerjee
 
PRESENTATION general mathematicsppt.pptx
PRESENTATION general mathematicsppt.pptx
DharylBallarta
 
From reducing flood risks to conserving water
From reducing flood risks to conserving water
Ali Ata
 
ai er make you happy ander The shor of morning.pptx
ai er make you happy ander The shor of morning.pptx
sartusorde
 
Quarter 3 Program Implementation Review and Performance Assessment
Quarter 3 Program Implementation Review and Performance Assessment
LaMariaAngelicaPunay
 
一比一原版(SFSU毕业证)旧金山州立大学毕业证如何办理
一比一原版(SFSU毕业证)旧金山州立大学毕业证如何办理
taqyed
 
NCC_Enrollment_Visual_Presenatation.pptx
NCC_Enrollment_Visual_Presenatation.pptx
19sharmalalit
 
TECHNOLOGY LIVELIHOOD EDUCATIONLESSON EXEMPLAR
TECHNOLOGY LIVELIHOOD EDUCATIONLESSON EXEMPLAR
AnnMargrettDuka
 
Power BI Jobs in Jaipur Your Gateway to Data Analytics Careers in Rajasthan.pdf
Power BI Jobs in Jaipur Your Gateway to Data Analytics Careers in Rajasthan.pdf
vinay salarite
 
一比一原版(LTU毕业证)利兹三一大学毕业证如何办理
一比一原版(LTU毕业证)利兹三一大学毕业证如何办理
Taqyea
 
Nsqf vhse admission career guidance kerala
Nsqf vhse admission career guidance kerala
anjaliparvathy2000
 
PHYSICAL EDUCATION AND HEALTH POWERPOINT
PHYSICAL EDUCATION AND HEALTH POWERPOINT
aguilarena08
 
S Pomeroy - Resume - Financial Leadership Role ATSV2 (06 13 25).pdf
S Pomeroy - Resume - Financial Leadership Role ATSV2 (06 13 25).pdf
ndhsshare1
 
climate_change_global_action_and_local_responsibility_xev18307.pptx
climate_change_global_action_and_local_responsibility_xev18307.pptx
hamdeyadd
 
Ad

microprocessor MICROPROCESSOR 8085 MICROPROCESSOR 8085

  • 1. Course Name: Microprocessor Architecture B. Sc. (Information Technology) Semester – II
  • 2. MICROPROCESSOR 8085 • Reference Book:Ramesh S. Goankar, “Microprocessor Architecture, Programming and Applications with 8085”, 5thEdition, Prentice Hall. • Computer System Architecture- M. Morris Mano • Structured Computer Organization- Andrew C. Tanenbaum
  • 3. Unit-I • Microprocessor, microcomputers, and Assembly Language: • Microprocessor, Microprocessor Instruction Set and Computer Languages, From Large Computers to Single-Chip Microcontrollers, Applications. • Microprocessor Architecture and Microcomputer System: • Microprocessor Architecture and its operation’s, Memory, I/O Devices, Microcomputer System, Logic Devices and Interfacing, Microprocessor-Based System Application. • 8085 Microprocessor Architecture and Memory Interface: • Introduction, 8085 Microprocessor unit, 8085-Based Microcomputer, Memory Interfacing, Interfacing the 8155 Memory Segment, Illustrative Example: Designing Memory for the MCTS Project, Testing and Troubleshooting Memory Interfacing Circuit, 8085-Based Single-Board microcomputer.
  • 4. Details..of Unit-I • Basic Concepts of Microprocessors. • Differences among I. Microcomputer II. Microprocessor III. Microcontroller • What about micro • Definition of the Microprocessor
  • 5. Definition .. • The earliest microprocessor (the Intel 8088 and Motorola’s 6800) recognized 8-bit words. • Later microprocessors (8086 and 68000) were designed with 16-bit words. • Today, all processors manipulate at least 32 bits at a time and there exists microprocessors that can process 64, 80, 128 bits
  • 6. A Microprocessor-based system • Internally, the microprocessor is made up of 3 main units. • The Arithmetic/Logic Unit (ALU) • The Control Unit. • An array of registers for holding data while it is being manipulated.
  • 7. Architecture of Intel 8085 Microprocessor
  • 8. Memory • Memory Map and Addresses. • The three cycle instruction execution model. To execute a program, the microprocessor “reads” each instruction from memory, “interprets” it, then “executes” it. (Fetches/Decode/Execute) • Machine Language. • The 8085 Machine Language • Assembly Language Defines a symbolic code for the instructions. “mnemonics”.
  • 9. 8085 Microprocessor Architecture • 8-bit general purpose μp • Capable of addressing 64 k of memory • Has 40 pins • Requires +5 v power supply • Can operate with 3 MHz clock • 8085 upward compatible
  • 10. 8085 MicroprocessorArchitecture.. System Bus –wires connecting memory & I/O to microprocessor – Address Bus Unidirectional Identifying peripheral or memory location – Data Bus Bidirectional Transferring data – Control Bus Synchronization signals Timing signals Control signal
  • 11. Intel 8085 Microprocessor.. Microprocessor consists of: • Control unit: Control microprocessor operations. • ALU: performs data processing function. • Registers: provide storage internal to CPU. • Interrupts • Internal data bus
  • 12. The Internal Architecture • The Program Counter (PC): -Control the sequencing of the execution of instructions. • The Stack pointer: -The stack pointer is also a 16-bit register that is used to point into memory. -LIFO
  • 13. Unit-II Introduction to 8085 Assembly Language Programming: – The 8085 Programming Model – Instruction Classification – Instruction – Data and Storage – Writing assembling and Execution of a simple program – Overview of 8085 Instruction Set – Writing and Assembling Program
  • 14. Instruction and Data Formats Each instruction has two parts. – The first part is the task or operation to be performed. This part is called the “opcode” (operation code). – The second part is the data to be operated on Called the “operand”.
  • 15. The 8085 Instructions • Data Transfer Operations (MOV, MVI, LDA, and STA) • Arithmetic Operations (ADD, ADI, SUB, SUI) Arithmetic Operations Related to Memory • Logic Operations: (ANA, ANI, ORA, ORI, XRA and XRI, Complement, Rotate,Compare)
  • 16. The 8085 Instructions… • MOV M B: Copy the data from register B into a memory location. • LDAX Rp (LoaD Accumulator eXtended) • LXI Rp, <16-bit address>(Load eXtended Immediate) • The instruction LXI B 4000Hwill place the 16- bit number 4000 into the register pair B, C.
  • 17. The 8085 Instructions… Operation: Load an 8-bit number into the accumulator. MVI A, 32 -Operation: MVI A – Operand: The number 32 – Binary Code: • 0011 11103E 1st byte. • 0011 001032 2nd byte.
  • 18. The 8085 Instructions.. • Branch Operations: –Two types: Unconditional branch. Go to a new location no matter what. (JMP, CALL, RET) –Conditional branch. Go to a new location if the condition is true. (JZ, JNZ, JC, JNC, JP, JM)
  • 19. The 8085 Instructions.. • Machine Control Operations HLT--Stop executing the program. NOP--No operation
  • 20. Unit - III • Programming Techniques With Additional Instructions: – Programming Techniques: • Looping, Counting and Indexing – Additional Data Transfer and 16-Bit Arithmetic Instructions – Arithmetic Instruction Related to Memory – Logic Operations: • Rotate • Compare • Dynamic Debugging
  • 21. Unit - III • Counters and Time Delays: – Counters and Time Delays – Generating Pulse Waveforms – Debugging Counter and Time-Delay Programs
  • 22. Counters & Time Delays • A loop counter is set up by loading a register with a certain value. • using the DCR (to decrement) and INR (to increment) the contents of the register are updated. • Sample ALP for implementing a loop using INR or DCR • Sample program Using a Register Pair as a Loop Counter
  • 23. Delays • Sample program can use a loop to produce a certain amount of time delay in a program. • Nested loops can be easily setup in Assembly language by using two registers for the two loop counters. • Nested Loops for Delay. • Delay Calculation of Nested Loops – inner loop, outer loop – Increasing the delay
  • 24. Timing Diagram Following Buses and Control Signals must be shown in a Timing Diagram: • Higher Order Address Bus. • Lower Address/Data bus • ALE • RD • WR • IO/M
  • 25. Timing Diagram..continued • Op-Code Fetch Cycle • Memory Read Cycle • Memory Write Cycle
  • 26. Stack and Subroutines • The stack is an area of memory identified by the programmer for temporary storage of information. • The stack is a LIFO structure. • The stack normally grows backwards into memory. • The programmer defines the bottom of the stack and the stack grows up into reducing address range.
  • 27. Stack and Subroutines.. • In the 8085, the stack is defined by setting the SP (Stack Pointer) register. LXI SP, FFFFH • Saving Information on the Stack • The 8085 provides two instructions: PUSH and POP for storing information on the stack and retrieving it back. • Operation of the Stack
  • 28. Stack and Subroutines.. • During pushing, the stack operates in a “decrement then store” style. • During poping, the stack operates in a “use then increment” style. • The SP pointer always points to “the top of the stack”. • The PSW Register Pair
  • 29. Subroutines • A subroutine is a group of instructions that will be used repeatedly indifferent locations of the program. • The 8085 has two instructions for dealing with subroutines. • The CALL instruction is used to redirect program execution to the subroutine. • The RTE insutruction is used to return the execution to the calling routine.
  • 30. Subroutines.. • Passing Data to a Subroutine. • Call by Reference and Call by Value. • Conditional CALL and RTE Instructions. CC, call subroutine if Carry flag is set. CNC, call subroutine if Carry flag is not set RC, return from subroutine if Carry flag is set RNC, return from subroutine if Carry flag is not set
  • 31. Interrupts • Interrupt is a process where an external device can get the attention of the microprocessor. -The process starts from the I/O device –The process is asynchronous. • Interrupts can be classified into two types: Maskable(can be delayed) Non-Maskable(can not be delayed)
  • 32. Interrupts.. • The 8085 has 5 interrupt inputs. • Interrupt name Maskable Vectored INTR Yes No RST 5.5 Yes Yes RST 6.5 Yes Yes RST 7.5 Yes Yes TRAP No Yes • Interrupt Vectors and the Vector Table
  • 33. Interrupts.. • The Priority Encoder • Multiple Interrupts & Priorities • The 8085 Maskable/Vectored Interrupts. • The 8085 Maskable/Vectored Interrupt Process. • Manipulating the Masks
  • 34. Practicals.. • 1. Perform the following Operations related to memory locations. • a. Store the data byte 32H into memory location 4000H. • b. Exchange the contents of memory locations 2000H and 4000H • 2. Simple assembly language programs. • a. Subtract the contents of memory location 4001H from the memory location 2000H and place the result in memory location 4002H. • b. Subtract two 8-bit numbers. • c. Add the 16-bit number in memory locations 4000H and 4001H to the 16-bit number in memory locations 4002H and 4003H. The most significant eight bits of the two numbers to be added are in memory locations 4001H and 4003H. Store the result in memory locations 4004H and 4005H with the most significant byte in memory location 4005H. • d. Add the contents of memory locations 40001H and 4001H and place the result in the memory locations 4002Hand 4003H. • e. Subtract the 16-bit number in memory locations 4002H and 4003H from the 16-bit number in memory locations 4000H and 4001H. The most significant eight bits of the two numbers are in memory locations 4001H and 4003H. Store the result in memory locations 4004H and 4005H with the most significant byte in memory location 4005H. • f. Find the l's complement of the number stored at memory location 4400H and store the complemented number at memory location 4300H.
  • 35. Practicals.. • 3. Packing and unpacking operations. • a. Pack the two unpacked BCD numbers stored in memory locations 4200H and 4201H and store result in memory location 4300H. Assume the least significant digit is stored at 4200H. • b. Two digit BCD number is stored in memory location 4200H. Unpack the BCD number and store the two digits in memory locations 4300H and 4301H such that memory location 4300H will have lower BCD digit.
  • 36. Practicals.. • 4. Register Operations. • a. Write a program to shift an eight bit data four bits right. Assume that data is in register C. • b. Program to shift a 16-bit data 1 bit left. Assume data is in the HL register pair • c. Write a set of instructions to alter the contents of flag register in 8085. • d. Write a program to count number of l's in the contents of D register and store the count in the B register.
  • 37. Practicals.. • 5. Multiple memory locations. • a. Calculate the sum of series of numbers. The length of the series is in memory location 4200H and the series begins from memory location 4201H. a. Consider the sum to be 8 bit number. So, ignore carries. Store the sum at memory location 4300H. b. Consider the sum to be 16 bit number. Store the sum at memory locations 4300H and 4301H • b. Multiply two 8-bit numbers stored in memory locations 2200H and 2201H by repetitive addition and store the result in memory locations 2300H and 2301H. • c. Divide 16 bit number stored in memory locations 2200H and 2201H by the 8 bit number stored at memory location 2202H. Store the quotient in memory locations 2300H and 2301H and remainder in memory locations 2302H and 2303H.
  • 38. Practicals.. • d. Find the number of negative elements (most significant bit 1) in a block of data. The length of the block is in memory location 2200H and the block itself begins in memory location 2201H. Store the number of negative elements in memory location 2300H • e. Find the largest number in a block of data. The length of the block is in memory location 2200H and the block itself starts from memory location 2201H. Store the maximum number in memory location 2300H. Assume that the numbers in the block are all 8 bit unsigned binary numbers.
  • 39. Practicals.. • 6. Calculations with respect to memory locations. • a. Write a program to sort given 10 numbers from memory location 2200H in the ascending order. • b. Calculate the sum of series of even numbers from the list of numbers. The length of the list is in memory location 2200H and the series itself begins from memory location 2201H. Assume the sum to be 8 bit number so you can ignore carries and store the sum at memory location 2Sample problem: • c. Calculate the sum of series of odd numbers from the list of numbers. The length of the list is in memory location 2200H and the series itself begins from memory location 2201H. Assume the sum to be 16-bit. Store the sum at memory locations 2300H and 2301H.
  • 40. Practicals.. d. Find the square of the given numbers from memory location 6100H and store the result from memory location 7000H • e. Search the given byte in the list of 50 numbers stored in the consecutive memory locations and store the address of memory location in the memory locations 2200H and 2201H. Assume byte is in the C register and starting address of the list is 2000H. If byte is not found store 00 at 2200H and 2201H • f. Two decimal numbers six digits each, are stored in BCD package form. Each number occupies a sequence of byte in the memory. The starting address of first number is 6000H Write an assembly language program that adds these two numbers and stores the sum in the same format starting from memory location 6200H • g. Add 2 arrays having ten 8-bit numbers each and generate a third array of result. It is necessary to add the first element of array 1 with the first element of array-2 and so on. The starting addresses of array l, array2 and array3 are 2200H, 2300H and 2400H, respectively
  • 41. Practicals.. 7. Assembly programs on memory locations. a. Write an assembly language program to separate even numbers from the given list of 50 numbers and store them in the another list starting from 2300H. Assume starting address of 50 number list is 2200H. b. A list of 50 numbers is stored in memory, starting at 6000H. Find number of negative, zero and positive numbers from this list and store these results in memory locations 7000H, 7001H, and 7002H respectively b. Program to calculate the factorial of a number between 0 to 8.
  • 42. Practicals.. 8. String operations in assembly programs. • Multiply the 8-bit unsigned number in memory location 2200H by the 8-bit unsigned number in memory location 2201H. Store the 8 least significant bits of the result in memory location 2300H and the 8 most significant bits in memory location 2301H. • Divide the 16-bit unsigned number in memory locations 2200H and 2201H (most significant bits in 2201H) by the B-bit unsigned number in memory location 2300H store the quotient in memory location 2400H and remainder in 2401H • • DAA instruction is not present. Write a sub routine which will perform the same task as DAA. •
  • 43. Practicals.. • Calculations on memory locations. • Arrange an array of 8 bit unsigned no in descending order • Transfer ten bytes of data from one memory to another memory block. Source memory block starts from memory location 2200H where as destination memory block starts from memory location 2300H • Write a simple program to Split a HEX data into two nibbles and store it in memory
  • 44. Practicals.. • 10. Operations on BCD numbers. • a. Add two 4 digit BCD numbers in HL and DE register pairs and store result in memory locations, 2300H and 2301H. Ignore carry after 16 bit. • b. Subtract the BCD number stored in E register from the number stored in the D register • c. Write an assembly language program to multiply 2 BCD numbers