22-02-2013, 09:53 AM
PROGRAMMED TIME DELAYS
PROGRAMMED.pdf (Size: 75.13 KB / Downloads: 23)
OBJECTIVES:
Compute the time required to execute an 8085 assembly language program.
Design nested delay loops to generate a precise delay time.
Generate a repetitive digital signal having a precise frequency.
INTRODUCTION
Each 8085 instruction requires a specific amount of execution time. In most
applications, the programmer will attempt to minimize this execution time by writing
the program in an efficient manner. There are many situations however, in which
desirable to generate a time delay. This delay time can serve as a time to generate
periodic waveforms or to sequence an industrial process.
The execution time required by each instruction is function of the number of
(T-states) in its instruction cycle. Each T-state is equal to one period of the 8085 system
clock. For example, if an 8085 microprocessor has a clock frequency of 2 MHz, then
each T-state equal 0.5 μs. assuming this clock frequency, the instruction MVI A,byte,
which consumes seven T-states, would be executed
Note:-
Compute the same calculation when clock frequency=3.125MHZ, then each T-state
equal 320ns.
The time delay generated by a program is compounded by nesting loops within
other loops. The total delay will then be the product of the individual delay for each
loop. If longer loops are required, register pairs may be used for loop counters.
Statements such as XTHL are often placed inside delay loops as "padding", to increase
the total delay time.