answersLogoWhite

0

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

13y ago

What else can I help you with?

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.


Write a main program in INTEL 8085 microprocessor to count continuously in binary with a one second delay between each count?

To create a main program in the Intel 8085 microprocessor that counts continuously in binary with a one-second delay between each count, you can use the following code: START: LXI H, 0000H ; Initialize register pair HL to 0000 INX H ; Increment HL CALL DELAY ; Call delay subroutine for 1 second JMP START ; Repeat the process DELAY: MVI C, 0FFH ; Load C with 255 D1: MVI B, 0FFH ; Load B with 255 D2: DCR B ; Decrement B JNZ D2 ; Loop until B becomes 0 DCR C ; Decrement C JNZ D1 ; Loop until C becomes 0 RET ; Return from delay This program initializes a counter, increments it continuously, and calls a delay subroutine that creates a delay of approximately one second using nested loops.


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