Hi I would like to how to calculate the value that should be loaded into T0MR0 register to create a 2 sec delay? Thanks
Read the data sheet for your particular part. (What part number might that be?) It will be some function of the clock rate, probably run through some sort of divider and/or programmable pre-scaler logic to get to a more convenient range. The timer will count this divided-down clock; divide 2 seconds by the timer input rate to get the number of timer ticks that add up to 2 seconds.