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

Timer in autoload mode

I use Keil sometimes and while using a timer in autoload mode, the TH0 is loaded with the calculated value but TL0 starts incrementing from 00 instead of the calculated value F0.Am I missing something while using or configuring the keil simulator?

Parents
  • The code clearly states that its polling and interupt mode.
    The code you show "clearly states" that no interrupt is involved

    Interupt register is not included as you can all see in the lines of the code.
    so, how did you imagine we would know

    All it does is check the flag and reset it after stopping the timer
    mixing polling and interrupt must be done with other means than the SFRs

    Someone stated that "Why use autoload mode". Is there a ban in using autoload mode if the pulse duration is small.
    absolutely not, but the code you show does not have any autoload use

    so, show some actual, complete, indented, commented code and someone will help you

    Erik

Reply
  • The code clearly states that its polling and interupt mode.
    The code you show "clearly states" that no interrupt is involved

    Interupt register is not included as you can all see in the lines of the code.
    so, how did you imagine we would know

    All it does is check the flag and reset it after stopping the timer
    mixing polling and interrupt must be done with other means than the SFRs

    Someone stated that "Why use autoload mode". Is there a ban in using autoload mode if the pulse duration is small.
    absolutely not, but the code you show does not have any autoload use

    so, show some actual, complete, indented, commented code and someone will help you

    Erik

Children