Hi,
I have PIC18LF46k80, with 32768Hz crystal on SOSC pin. i need 32 interrupts per second for other things.
Shematic:
PCB:
Crystal MH32768C datasheet:Code:ISR: DEFINE INTHAND myint #CONFIG CONFIG SOSCSEL = LOW ;Low power mode SOSC etc... #ENDCONFIG TMR1H = 252 T1CON = %10001101 T1GCON = 0 ASM myint Clrf BSR Btfss PIR1,0 GOTO End_RTC Clrf PIR1 Movlw .252 ; TMR1H=252 Movwf TMR1H Bsf _PULL Movlw .141 Movwf T3CON Movlw .255 Movwf TMR3H Movlw .223 Movwf TMR3L Bsf _TimeChanged,0 Incf _Ticks,F Movlw .31 ;if ticks=32 then Cpfsgt _Ticks GOTO End_RTC Incf _Seconds,F Bsf _TimeChanged,1 Clrf _Ticks Movlw .1 etc...
http://www.farnell.com/datasheets/1322434.pdf
I think that problem is in capacitors for crystal. I upload schematic and pcb layout, it's probably ok, but...
I tried to put capacitors from 10,12,22pF and result always is same. About 10s to much per day...
PC clock(Internet time disabled) and mobile phone are my references.
Any idea how to solve this??
Thanks




Bookmarks