Hello all,My clock time base is using TMR0.
The problem is for every 12 hours the time is varying about 3 minutes.
Here is the code.Any method to accurate?
The problem is for every 12 hours the time is varying about 3 minutes.
Here is the code.Any method to accurate?
Code:
;PS=1:128,TMR0=39
;39X128 = 4992US+8uS
= 5000uS
ISR_Enter movwf W_Temp ;save W register contents
movf STATUS,W ;move status register into W register
movwf S_Temp ;+1=5
movlw 100h-d'39' ;+1 =6
nop ;+1 =7
movwf TMR0 ;+1 =8 + 39*128 = 5,000
bcf INTCON,T0IF ;reset int flag
decfsz ISR_Count,F
goto Split_Digits
movlw .200
movwf ISR_Count
;
;===============================================
;Update RTC on every 1 second period
;===============================================
;
Update_Time incf Time_Seconds,F ;generate 60 seconds