answersLogoWhite

0


Best Answer
Write a Subroutine for 8085 to generate delay 0f 10ms(assume .333us clock cycle)

; REQUIRED T STATES

; = 10ms/.333us

; = 30030 T STATES

; SO WE CAN SAY VALUE OF COUNT HERE WILL BE HIGH

; THEREFORE TAKING A REGISTER PAIR AS A COUNTER

LXI B, COUNT ; 10T LOWER ADDRESS IN B HIGHER IN C

L1 DCX B ; 6T

MOV A,B ; 4T MOVE LOWER ADDRESS IN A

ORA C ; 4T SEE IF BOTH A AND C ARE ZERO

JNZ L1 ; 10/7T

RET ; 10T

; Td = 10 + COUNT X ( 6 + 4 + 4 + 10) + 10 - 3 = 30030

; 24COUNT = 30030 - 17 = 30013

; COUNT = 1250(DEC) = 04E2(HEX)

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you write delay subroutine in 8085?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Difference between delay subroutine and ordinary subroutine in context of 8085?

a subroutine is a portion of the code within a larger program which performs a specific function and is independent of remaining code.....delay routines are subroutines used for maintaining the timings of various operations in microprocessor


Write a program to introduce a time delay using subroutine?

go and have agud sleep


What is subroutine in 8085?

in 8085 microprocessor a subroutine is a separate program written aside from main program ,this program is basically the program which requires to be executed several times in the main program. the microprocessor can call subroutine any time using CALL instruction . after the subroutine is executed the subbroutine hands over the program to main program using RET instruction.


How is delay calculated in 8085?

The delay is calculated in 8085 by making the use of formulas. Because of the complexity of the mathematical operations a calculator may also be required.


What are stacks subroutines in 8085 microprocessor?

A subroutine is a group of instructions that will be used repeatedly in diff locations of the program..........rather than repeating the same instructions several times, they can be grouped into a subroutine that is called from diff locations. 8085 has 2 instruction set for dealing with subroutines: 1.CALL -direct the program execution to the subroutine. Generally it pushes address of next instruction of program counter onto the stack,then goes to the address of subroutine. 2.RET:- pops the address of next instruction from the stack and places it in the program counter and returns to that address to continue processing. For example, you have an often used value stored in HL. You have to call a subroutine that you know will destroy HL (with destroy I mean that HL will be changed to another value, which you perhaps don't know). Instead of first saving HL in a memory location and then loading it back after the subroutine, you can push HL before calling and directly after the calling pop it back. Of course, it's often better to use the pushes and pops inside the subroutine.


Write a program to add two 8 bit numbers in microprocessor 8051?

write it in 8085


Why 8085 is called parallel device?

The data bus of 8085 is 8 bit and so it will read or write 8 bits simultaneously.So it is Parallel Devise


What is subroutine in java?

Subroutine mean what (in java)?


What are subroutine linkages?

The Mechanism that makes possible to transfer control between the calling program and Subroutine is reffered to as SUBROUTINE LINKAGE


Why is the data bus in 8085 bidirectional?

So that the processor can both read and write data.


2x2 matrix multiplication program in 8085 processor?

how to write a program for matrix multiplication in microprocesspr


Write a program to eliminate the blanks from string 8085?

public class RemoveSpace{ public static void main(String args[]){ String str = "8085"; Sysytem.out.println(str.trim()); } } Get The Desired OutPut....