0% found this document useful (0 votes)
72 views3 pages

Practical 7 Time Delay

The document outlines an experiment on studying counters and time delays using an 8085 microprocessor. It provides 5 aims: 1) Calculate execution times for two programs using counters. 2) Calculate execution time for another program using a counter. 3) Write a program to generate a 5 second delay. 4) Write a program to generate a 2.5 kHz square wave. 5) Make an up-down counter that counts from 00H to 10H and back using an output port to display the counts with a 1 second delay between each count. Sample programs and calculations are provided as answers for the first two aims.

Uploaded by

Het Patel
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
72 views3 pages

Practical 7 Time Delay

The document outlines an experiment on studying counters and time delays using an 8085 microprocessor. It provides 5 aims: 1) Calculate execution times for two programs using counters. 2) Calculate execution time for another program using a counter. 3) Write a program to generate a 5 second delay. 4) Write a program to generate a 2.5 kHz square wave. 5) Make an up-down counter that counts from 00H to 10H and back using an output port to display the counts with a 1 second delay between each count. Sample programs and calculations are provided as answers for the first two aims.

Uploaded by

Het Patel
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 3

Subject: Microprocessor and Interfacing Experiment No.

07 DATE:

Title: To study Counter & Time Delay

Rev. No.

1.00

AIM: - TO STUDY COUNTER & TIME DELAY OPERATION. COUNTERS & TIME DELAYS 1) Calculate the time required by 8085 to execute the following program.(Assume crystal of 6.144MHz frequency). T states MVI B,DEH 7 LOOP: DCR B 4 NOP 4 NOP 4 JNZ LOOP 10/7 RST 1 12 2) Calculate the time required by 8085 to execute the following program.(Assume crystal of 6.144MHz frequency). T-states LXI B,FFFFH 10 LOOP: DCX B 6 NOP 4 NOP 4 MOV A,C 4 ORA B 4 JNZ LOOP 10/7 3) Write a program to generate a delay of 5 seconds.(Assume crystal of 6.144MHz frequency). 4) Write a program to generate a square wave of 2.5 kHz frequency. Use D 0 bit of output port ACH, to output the square wave. 5) Make an up-down counter that will count from 00H to 10H in upward & again from 10H to 00H in downward. Send the counts to output port CDH. Between each count, there should be a time delay of 1 second approximately.(Assume crystal of 6.144MHz frequency).

Grade

Lab-In-Charge

H.O.D.

ATMIYA INSTITUTE OF TECHNOLOGY & SCIENCE, RAJKOT

7.1

ANSWERS
A-1. (DE)h = (222)10 = N10 Loop delay Td = No. of T-states in a loop * system clock period * N10 = 22 * 0.3 * 10-6 * 222 = 1465.2 * 10-6 S delay outside loop To = No. of T-states * system clock period = 19 * 0.3 * 10-6 = 5.7 * 10-6 S Total delay = Td + To = 1465.2 * 10-6 + 5.7 * 10-6 = 1476.9 * 10-6 S A-2. (FFFF)h = (65535)10 Loop delay Td = No. of T-states in a loop * system clock period * N10 = 42 * 0.3 * 10-6 * 65535 = 0.8 S

A-3.

mvi C, 05h loop: lxi H, 3648h loop1: dcx H mov A, H ora L jnz loop1 dcr C jnz loop mvi D, 00h ROTATE: mov A, D cma mov D, A ani 01h out ACh mvi B, 2Ah LOOP: dcr B jnz LOOP jmp ROTATE START: DSPLAY: LOOP1: mvi B, 00h out CDh lxi H, dcx H Mov A, L ora H jnz LOOP1
7.2

A-4.

A-5.

ATMIYA INSTITUTE OF TECHNOLOGY & SCIENCE, RAJKOT

BACK: LOOP2:

inr B mov A, B cpi 11h jnz DSPLAY dcr B mov A, B out CDh lxi D, dcx D mov A, E ora D jnz LOOP2 dcr B cpi FFh jnz BACK jz START

ATMIYA INSTITUTE OF TECHNOLOGY & SCIENCE, RAJKOT

7.3

You might also like