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

WHY KEIL DOES NOT HAVE DELAY FUNCTION LIKE TURBO C

Hello all,
1) can any one help me to write function in keil c51, like " delay(int milli sec)" like in turbo c/c++.
2) for above i want to use present project's crystal value (like variable) in user defined functions how to get that crystal value while writing code in "c".
thankyou,
PADMANABHAM

Parents
  • "WHY KEIL DOES NOT HAVE DELAY FUNCTION LIKE TURBO C"

    Because Turbo 'C' (remember that?!) builds programs to run on a PC and, as such, has the services of an operating system to call upon.
    Turbo C's delay function simply provides access to the underlying system's timer services.

    Keil C51 builds programs to run on 8051-based embedded systems; it makes no assumptions about the target. Therefore, if you want a delay() you must provide it your self - because only you can do that in a way that is compatible with the requirements, limitations, restrictions, etc of your particular application.

    Here's a previous discussion on the subject:
    http://www.keil.com/forum/docs/thread2938.asp

Reply
  • "WHY KEIL DOES NOT HAVE DELAY FUNCTION LIKE TURBO C"

    Because Turbo 'C' (remember that?!) builds programs to run on a PC and, as such, has the services of an operating system to call upon.
    Turbo C's delay function simply provides access to the underlying system's timer services.

    Keil C51 builds programs to run on 8051-based embedded systems; it makes no assumptions about the target. Therefore, if you want a delay() you must provide it your self - because only you can do that in a way that is compatible with the requirements, limitations, restrictions, etc of your particular application.

    Here's a previous discussion on the subject:
    http://www.keil.com/forum/docs/thread2938.asp

Children