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
  • "After reading the above posts, I think the simulator is designed to function the way it operates. "

    tough to think otherwise.

    "Once it reads the mode, it should load both the registers with the pre-defined values to function in mode 2, but for some reason it doesnt."

    it doesn't because it is not designed to do that, as documented in the datasheet.

Reply
  • "After reading the above posts, I think the simulator is designed to function the way it operates. "

    tough to think otherwise.

    "Once it reads the mode, it should load both the registers with the pre-defined values to function in mode 2, but for some reason it doesnt."

    it doesn't because it is not designed to do that, as documented in the datasheet.

Children
  • the simulator .... it doesn't because it is not designed to do that, as documented in the datasheet.

    no simulator is perfect, whatever is documented in the datasheet for the chip may and may not be correctly simulated.

    Erik

  • "no simulator is perfect, whatever is documented in the datasheet for the chip may and may not be correctly simulated."

    reading comprehension, erik.

    that "it" refers to his statement about the chip loading up both TH0/TL0 once set in mode 2. the chip does NOT do that. and the simulator correctly simulates that portion of the functionality.

    and his code runs also as expected in the simulator, as it did on real hardware - because I tried. none of what he "observed" could be observed in my set-up, or inferred from the datasheet, or simulations.

    I am going to incline to say that this is a user (observational) problem.