Hello Every : I use AT89C52 and 11.059MHz oscillator. 1 instuction takes about 1 micro-second.(10^-6 sec.) I write a delay function in *.asm. It works well , but I want it adjustable. I want to delay according to the parameter I pass.My goal is to modify delay time for some protocol time slot testing. I found it some how difficult to achieve. Because the basic instruction , for example : _nop_ , take 1 micro-second. I can't add more decision. It will takes more time. How could I implement such kind of delay? Please give me a hand , thanks a lot~~
"when I call by constant (ex:NOPS(10)), it almost meet my require.But when I call by variable (ex:NOPS(delay_count) where delay_count = 10) it has serious overhead ." See my post dated 11/17/03 15:26:56 in the thread I cited earlier: http://www.keil.com/forum/docs/thread2938.asp It specifically describes a way to cope with this overhead!