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
  • "so if you were to step through the disassembly, you should see TL0 starting from 0xf0, rather than 0xf3."

    stepping through the code in assembly, TF0 is set right after the roll over, and TL0 is at 0xf1.

    the reading of 0xf3 is likely because of the time lapse on testing the TF0 flag while the tmr0 continues to run and increment TL0.

Reply
  • "so if you were to step through the disassembly, you should see TL0 starting from 0xf0, rather than 0xf3."

    stepping through the code in assembly, TF0 is set right after the roll over, and TL0 is at 0xf1.

    the reading of 0xf3 is likely because of the time lapse on testing the TF0 flag while the tmr0 continues to run and increment TL0.

Children
No data