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 Reply Children
  • "not necessarily, reload mode is an 8bit counter other modes are 13/16 bit"

    since you have trouble understanding it, please allow me to restate it:

    THE code would behave the same regardless if a reload mode is used or not.

    I did not say that ANY code would behave the same regardless if a reload mode is used or not.

    hope it help with your comprehension of what I wrote.

  • since you have trouble understanding it, please allow me to restate it:

    THE code would behave the same regardless if a reload mode is used or not.
    it seems that it mis you that have "trouble understanding it"

    TH0 = 0xF0;
    TL0 = 0xF0;

    in reload mode (8 bit) would count up from 0xF0 to 0 (expressed as 16 bit: 0xFFF0 to 0)
    in other (16bit) modes wold count up from 0xF0F0 to 0 - a whole lot longer!

    Erik