find the time delay for the delay subroutine shown to the ri

find the time delay for the delay subroutine shown to the right if the system has an DS89C430 with frequency of 11.0592MHz.

DELAY: MOV R3,#150

HERE: NOP

NOP

NOP

DJNZ R3,HERE

RET

Solution

1 clock cycle = 1/11.0592 us = 0.0904 usec

1 Machine cycle = 12 clock cycles = 12*0.0904 usec = 1.085 usec.

MOV instruction takes 1 machine cycle.

NOP takes 1 Machine cycle

DJNZ takes 2 machine cycles

RET takes 2 machine cycles

#150 is decimal number so the loop runs for 150 times

Time Delay = [ 1 + (1+ 1+ 1 + 2) x 150 + 2 ] x 1.085 usec = 817.005 usec = 817 u sec

find the time delay for the delay subroutine shown to the right if the system has an DS89C430 with frequency of 11.0592MHz. DELAY: MOV R3,#150 HERE: NOP NOP NOP

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site