Hi,

When using multiple interrupt sources you can prioritize which Interrupt flags to check when vectored to ISR, still the results may not be deterministic every time. Say you are already servicing a lower priority interrupt (not Hardware but DT's scheme) a higher priority interrupt like your time tick occurs. Generally adding the rolling timer with the offset value does the trick however if you would like more precision then use the compare module on the PIC which resets the associated timer automatically and gives a rock solid time base.