AnsweredAssumed Answered

RTC_PCF8563 time is not increasing properly

Question asked by Gomathi Chinnasamy on Apr 13, 2016
Latest reply on Apr 19, 2016 by Artur Petukhov


Am working with PCF8563 here i am setting the date and time, Then am reading the same thing at every two seconds using some timer concept here for one to two hours the time is updating properly , after that the time is not increasing gradually some 10 minutes deviation is happening.

 

 

The same thing if i read every one seconds means time is getting update properly, What is the issue. Where am doing the mistake. What and all the possibilities for this issue.How to resolve this.

 

 

I attached my I2C files.

 

uint8_t RTC_buffer_Write[14]={0x30,0x00,0x12,0x02,0x01,0x01,0x15};

uint8_t RTC_buffer_Read[13];

 

am using this line for writing the date and time to RTC

 

I2C_Read_Write(RTC8563_ADDR,0x02,&RTC_buffer_Write[0],&RTC_buffer_Read,0,7);

 

 

 

this line for reading the date and time

 

I2C_Read_Write(RTC8563_ADDR,0x02,&RTC_buffer_Write,&RTC_buffer_Read,1, 7);

 

  /***********SECONDS***************/

  RTC_buffer_Read[0]=RTC_buffer_Read[0] & 0x7f;

  /***********MINUTES***************/

  RTC_buffer_Read[1]=RTC_buffer_Read[1] & 0x7f;

  /***********HOURS***************/

  RTC_buffer_Read[2]=RTC_buffer_Read[2] & 0x3f;

  /***********DAYS***************/

  RTC_buffer_Read[3]=RTC_buffer_Read[3] & 0x3f;

  /***********NAME_OF_DAY***************/

  RTC_buffer_Read[4]=RTC_buffer_Read[4] & 0x07;

  /***********MONTHS***************/

  RTC_buffer_Read[5]=RTC_buffer_Read[5] & 0x1f;

Outcomes