I'm not sure that I understand problem, but I'll try to explain...
For 16 bit timer
$FFFF Is value at timer overflows to 0 when incremented by 1. So that value doesn't have anything with clock.
It does with timer(16 or 8 bit)
So If you need interrupt every timer tick, you will preload timer with $FFFF.
For 8 bit timer, value is FF, and if you increment that by 1, result is 0 and overflow.
8 is number of instruction to stop timer, load bytes to timer, and start timer. so you take it into count, when preloading timer.
And that is true only when clock for timer is Fosc/4. If timer is clocked from Fosc, then it will be 32 ticks for timer, if you load in 8 instruction.
But if you clock timer from slow clock eg 31KHz or 32768Hz, and processor is clocked from HS osc, you can preload timer in les than one tick. So you can ignore that...
(20 / 4) this is timer clock. And that value will depend on clock speed, not $FFFF.
Bookmarks