If Enabled = 1 AND Internal_Enabled = 1, then
If (RTC - System Clock Track) > 1 sec (assuming your timer is on a 1 second time base)
Then System Clock Track = System Clock Track - 1;
Accumulated Value = Accumulated Value + 1
If Accumulated Value > Preset Value
Then Done Bit = 1
Else Done Bit = 0
If Enabled = 1 AND Internal_Enabled = 0
then system clock track = system clock.
Internal_Enabled = 1
If Enabled = 0 Then Done bit = 0;
Accumulated Value = 0
Internal_Enabled = 0