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 Using C

Hi,
I want to know how to generate delays using C. I am using 89c51, 11.0592 crystal.

Parents
  • the difference between 50.0 and 49.99 is about 4 uS.

    To achieve that precision with 12Mhz Xtal and - I assume a 12 clocker - you need be precise within 4 instruction cycles.

    That will require that there are no MUL or DIV instructions in your program since an itrerrupt does not interrupt an instruction in progress.

    Erik

Reply
  • the difference between 50.0 and 49.99 is about 4 uS.

    To achieve that precision with 12Mhz Xtal and - I assume a 12 clocker - you need be precise within 4 instruction cycles.

    That will require that there are no MUL or DIV instructions in your program since an itrerrupt does not interrupt an instruction in progress.

    Erik

Children