How is the 8-bit TMR setup?
Answer The 8-bit Timer/Event Counter is a count-up counter, which will count up to a value of 255, which is 0FFH, at which point the counter will overflow and generate an interrupt. Therefore if it is required to count up to a number N, where N<255, the TMR register value must be setup to a value of 256-N. After setting up the TMR register value and starting the Timer/Event Counter, when it counts to a value of 255, on the next count, which is 256, it will overflow. Therefore the counted value will be 256-(256-N) = N.