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?
I agree that whatever mode the timer runs on is irrelevant for your question. so let's move on from that distraction.
"When running on mode 2, the TL0 register jumps directly to F3 and stops the timer in between. "
but you wrote earlier: "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."
two comments:
1) the two statements are inconsistent; so you may want to tell us which is accurate. 2) as to the timer jumping to 0xf3 rather than 0xf0: because you are likely stepping through the code in C. each C statement may correspond to multiple asm instructions. so if you were to step through the disassembly, you should see TL0 starting from 0xf0, rather than 0xf3.
"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.