Write a Subroutine for 8085 to generate delay 0f 100us(assume 320ns clock cycle)



; clock cycle given is 320ns
; therefore required T-states = 100us/320ns
;      = 312.5 Tstates


MVI C, COUNT ; 7 T STATES
L1 DCR C ; 4T
JNZ L1 ; 10/7 T
RET ; 10 T REMEMBER A SUBROUTINE IS TO BE MADE


; Td = 7(MVI C, COUNT) + (COUNT X (4+10)) + 10(RET) – 3(LAST JUMP WILL NOT OCCUR) = 312.5
; THEREFORE 14COUNT = 297.5
; COUNT = 21.32 = 21(DEC) = 15(HEX)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s