hi, i made some function to read and write to DS1307.void I2C1_Init()
{
I2C1BRG = 0x09;
I2C1CON = 0x8000;
I2C1STAT = 0x00;
_NSTDIS = 0;
//I2C1CONbits.RCEN = 1;
I2C1CONbits.RCEN = 1;
}
void I2C1_wait()
{
I2C1BRG = 0x09;
I2C1CON = 0x8000;
I2C1STAT = 0x00;
_NSTDIS = 0;
//I2C1CONbits.RCEN = 1;
I2C1CONbits.RCEN = 1;
}
void I2C1_wait()