What are the reasons of this undesired effect:
I have a PIC with RTC (Real time clock) connected to an external 32.768kHz crystal for auto-calibration (according to PIC Manual handbook). The crystal is also connected with two 12.5pF capacitors (to ground).
Just after start up of the PIC, the flow of the time given by PIC is wrong (a second given by the PIC are 4 real seconds more or less) and it keeps so until I touch the cover of the crystal with the finger, then the time flow right. After shutdown and restart the problem appears again. I mean it is a problem with electrostatic charge. but why and from where comes the charges?
- The PIC pins for the crystal are defined according compiler rules for external clock, could the problem comes from the PIC pins? (due to float possible state)
- Is it a signal that some capacitor is broken? Or maybe the 12.5pF are not enough...
- The crystal is placed only 1 cm from the pins, should it be even closer?
Note: question was updated following comments bellow - original capacitors were 22pF, now I have changed to 12,5pF but the problem persist.