Delay
-
carbonBased
RE:Delay
I would say, probably the best way, would be to utilize the timer interrupt or rtc.
Increment a counter by 1 on each tick, in the interrupt. Your delay method can then grab the current value, and wait for a specific value knowing that, for example, this counter is going to increment 100 times in a second.
Cheers,
Jeff
Increment a counter by 1 on each tick, in the interrupt. Your delay method can then grab the current value, and wait for a specific value knowing that, for example, this counter is going to increment 100 times in a second.
Cheers,
Jeff
-
Ramanan
RE:Delay
Hi,
'in' or 'out' instruction cause one microsecond delay in any CPU (some where in the internet i red this). So use this in or out on a port 0x80 to delay. port 0x80 is safe and nothing will happen when u use these instructions on 2 it.
Do 1000 IN (or OUT, any one) to get the 1 millisecond delay. Do 1000000 IN to get the i second delay.
rgds,
YogaRamanan.T
'in' or 'out' instruction cause one microsecond delay in any CPU (some where in the internet i red this). So use this in or out on a port 0x80 to delay. port 0x80 is safe and nothing will happen when u use these instructions on 2 it.
Do 1000 IN (or OUT, any one) to get the 1 millisecond delay. Do 1000000 IN to get the i second delay.
rgds,
YogaRamanan.T