0% found this document useful (0 votes)
0 views22 pages

EET303 Module II

The document provides an overview of the 8085 instruction set, including details on rotate instructions, data transfer, and stack operations. It discusses the use of subroutines for code efficiency and delay routines for timing control in microprocessor applications. Additionally, it explains how to compute delay times based on T-states and system clock periods.

Uploaded by

savclaude43
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)
0 views22 pages

EET303 Module II

The document provides an overview of the 8085 instruction set, including details on rotate instructions, data transfer, and stack operations. It discusses the use of subroutines for code efficiency and delay routines for timing control in microprocessor applications. Additionally, it explains how to compute delay times based on T-states and system clock periods.

Uploaded by

savclaude43
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/ 22

EET303

Microprocessors and
Microcontrollers
Module II
8085 instruction set overview
8085 instruction set overview . . . contd.
8085 instruction set overview . . . contd.
8085 instruction set overview . . . contd.
8085 instruction set overview . . . contd.
Rotate instructions
Instructions for 16-bit data transfer
RLC
RAL

RRC and RAR


Instruction summary
Instruction summary
Instruction summary
Instruction summary
Carry flag
STC - Setting the carry
CMC - Complementing the carry

Program:
Clear the carry flag and load FFH in register C.
Add 01H to C. If the carry flag is set, display 01H at
output port 00H , else display the contents of
register C.

Try the same using INR instruction.(CY flag is not


affected.)
Stack
• A portion of memory is designated as stack.
• Operates on LIFO principle.
• Beginning of stack is defined by instruction LXI SP,
• Storing of data begins at address 1 less than content of
SP.
• Stack grows in the opposite direction to data storage.
• Size is limited only by the availability of memory.
• PUSH and POP instructions are used.
• 2 bytes from register pairs are stored and retrieved every
time.
• SP is always incremented/decremented by TWO.
Instructions involving stack
Subroutine
• Similar to a function - avoids repetition of code
• CALL and RET instructions are used
Conditional CALL and RETURN instructions
Delay subroutines

• Delay routines are subroutines used for


maintaining the timings of various operations in
microprocessor.
• In control applications, certain equipment needs
to be ON/OFF after a specified time delay.
• In some applications, a certain operation has to
be repeated after a specified time interval.
Delay subroutines
• The delay time is given by the total time taken to
execute the delay subroutine.
• It can be computed by multiplying the total
number of T-states required to execute
subroutine and the time for one T-state of the
processor.
• The total number of T-states can be computed
from the knowledge of T-states required for each
instruction.
• The time for one T-state of the processor is
given by the time period of the system clock.
Nesting of subroutines

You might also like