1 sec delay for 89s52 microconroller

Status
Not open for further replies.

sandy92

New Member
hi, i am using 11.0592MHZ crystal osc, i tried to create delay for exactly one sec (code shown below) but i got only 0.99sec. can anyone help me?

mov r0,#7
l3:mov r1,#255
l2:mov r2,#255
l1:djnz r2,l1
djnz r1,l2
djnz r0,l3
ret
 
You will only be as precise as one clock instruction...

Using NOP before the ret can fine tune.... How close can you get?
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…