Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
02/18/03 21:18
Read: times


 
#39388 - RE: calculating a delay ms and us
Responding to: ???'s previous message
you should try byte var instead of int like:

void 2usdelay(unsigned char d)
{ unsigned char i;
for(i=0;i<d;d++)
}
this will probably compiled into djnz command in assembly.
but if you use int var it will involve some multibyte addition and will consume 6 times more time as Erik Malund has said.


List of 10 messages in thread
TopicAuthorDate
calculating a delay ms and us            01/01/70 00:00      
   RE: calculating a delay ms and us            01/01/70 00:00      
      RE: calculating a delay ms and us            01/01/70 00:00      
         RE: calculating a delay ms and us            01/01/70 00:00      
         RE: calculating a delay ms and us            01/01/70 00:00      
            RE: calculating a delay ms and us            01/01/70 00:00      
         RE: calculating a delay ms and us            01/01/70 00:00      
            RE: calculating a delay ms and us            01/01/70 00:00      
   RE: calculating a delay ... addendum            01/01/70 00:00      
      RE: calculating a delay ... addendum            01/01/70 00:00      

Back to Subject List