time delay problem !!!

Thread Starter

lesin akbar

Joined Dec 16, 2007
30
im trying to generate 1sec time delay in 89C51. Im using 12MHz xtal. so my T=1micro sec. Im using t0 in mode2. so for 1sec delay i came up with a calculation of C8h x 64h x 32h = F4240h (200x100x50 = 1000000). here c8h i loaded into th0 and rest 64 and 32 i made a loop in inturrupt routine. But the delay generated is less than one sec, it is around 2/3rd of 1sec, why so ? and if else how to make this delay. ive to get it in the mode2 only.
 

beenthere

Joined Apr 20, 2004
15,819
There is always the method of arbitrarily increasing the number of iterations in the loop until the period does equal one second.
 
Top