When you write to the seconds register location 0 with $10, then you are clearing the bit automatically as the byte will be in binary 00010000, so bit 7 will be a zero and the clock will run.
The shape of the crystal is not important, it is the specification that is important. Do you have any specification of the crystal you have ?
If the crystal has a different load capacitance (CL) greater or smaller than 12.5pF, the chip will either not run or if it does run then the speed may not be 32768.
Which PIC are you using ? and what speed is it running at ?
Depending on the Pic and speed you may have to put the following DEFINE in your program.
The timing of the I2C instructions is set so that standard speed devices (100KHz) will be accessible at clock speeds up to 8MHz. Fast mode devices (400KHz) may be used up to 20MHz. If it is desired to access a standard speed device at above 8MHz, the following DEFINE should be added to the program:
DEFINE I2C_SLOW 1
Bookmarks