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

regarding delay in microcontroller

sir,
for delay in micro controller, everytime we have to use TMOD and TR and enable corresponding interrupt.is there any other less tedious way of programing a delay using keil cross compiler.
regards,
malay lakhani
final year BE student,
mumbai

Parents
  • You could just leave the hardware timer running permanently.

    Have a start_timer() function that sets some global to some suitable value;

    Each timer interrupt then decrements the global;

    When the global reaches zero, your time is up!

    You can easily extend this to support several simultaneous timers...

Reply
  • You could just leave the hardware timer running permanently.

    Have a start_timer() function that sets some global to some suitable value;

    Each timer interrupt then decrements the global;

    When the global reaches zero, your time is up!

    You can easily extend this to support several simultaneous timers...

Children
No data