This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Delay Loop in C51

Dear Friends,
How to create a delay loop in C51.Say for example I need a delay loop for 35mS.How to do this.I tried a code taken from this forum.It is
void delay(void)
{
unsigned long msdl;
msdl = 35L * 1000L;
while(--msdl)
{
_nop_();
}
}
Logically I think it should produce a 35mS delay code.But When I see in the Performance Analyzer window the delay produced is 0.547275 seconds.
Can anybody help me in solving this problem.
Thanx in Advance

Parents
  • "if you're serious about configuration management, you don't just need version control on your source code; you've got to version control the entire toolchain as well"

    And, of course, "the entire toolchain" includes the OS to run it on!

    Just look at the number of threads here where people are struggling to get some ancient Keil version (written for MS-DOS v3.3) running on XP or something!! :-0
    eg, http://www.keil.com/forum/docs/thread4969.asp

    then you might also struggle to find a 286-based PC to run it on...

    I think some military projects have entire development systems (complete hardware & software) in store in case changes ever need to be made...

Reply
  • "if you're serious about configuration management, you don't just need version control on your source code; you've got to version control the entire toolchain as well"

    And, of course, "the entire toolchain" includes the OS to run it on!

    Just look at the number of threads here where people are struggling to get some ancient Keil version (written for MS-DOS v3.3) running on XP or something!! :-0
    eg, http://www.keil.com/forum/docs/thread4969.asp

    then you might also struggle to find a 286-based PC to run it on...

    I think some military projects have entire development systems (complete hardware & software) in store in case changes ever need to be made...

Children
No data