; *********************************************
; Timer 2 Interrupt handler.
; Timer 2 has overflowed
;
Timer2
incf MSecs,F ; increment milli second counter
movlw d'100' ; Is MSecs 100 yet?
subwf MSecs,W
btfss STATUS,Z ; If MSecs is not 100, don't flash.
goto EndTimer2Interrupt
movlw H'FF'
movwf flagsecs
; Reinitialize Secs
clrf MSecs
incf Secs,F ; increment 10 second counter
movlw d'60' ; Is Secs 60 yet?
subwf Secs,W
btfss STATUS,Z ; If Secs is not 60, don't flash.
goto EndTimer2Interrupt
movlw H'FF'
movwf flag10s
; Reinitialize Secs
clrf Secs
incf Mins,F ; increment 60 second counter
movlw d'60' ; Is Mins 60 yet?
subwf Mins,W
btfss STATUS,Z ; If Mins is not 60, don't flash.
goto EndTimer2Interrupt
movlw H'FF'
movwf flag60s
; Reinitialize Mins
clrf Mins
incf Hours,F ; increment hour counter
movlw d'24' ; Is Mins 24 yet?
subwf Hours,W
btfss STATUS,Z ; If Hours is not 24, don't flash.
goto EndTimer2Interrupt
movlw H'FF'
movwf flag60s
; Reinitialize Hours
clrf Hours
EndTimer2Interrupt
BCF PIR1,TMR2IF ; Clear flag and continue.
return