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
  • "but it is a disgrace if the compiler does not contain logic for detecting shifts resulting in 8-bit aligned reads and writes."

    the pic24f family (probably the h and e families too) has a shifter block that can do up to 15 bit shifts in hardware.

    as a result, the shift approach on those chips are only 4x longer than the union approach.

    but the fastest really is to use a (double) pointer to point to the unsigned long / unsigned char array representation of a double: that takes about 1/4 of the time of the union approach.

Reply
  • "but it is a disgrace if the compiler does not contain logic for detecting shifts resulting in 8-bit aligned reads and writes."

    the pic24f family (probably the h and e families too) has a shifter block that can do up to 15 bit shifts in hardware.

    as a result, the shift approach on those chips are only 4x longer than the union approach.

    but the fastest really is to use a (double) pointer to point to the unsigned long / unsigned char array representation of a double: that takes about 1/4 of the time of the union approach.

Children
No data