Setting Specific Time Alarm on PCF85063A

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Setting Specific Time Alarm on PCF85063A

1,440 次查看
Vaishali9
Contributor I

Hi,

I'm having trouble setting an alarm on the PCF85063A RTC for a specific time. Here are the steps :

  1.  Set the Current time
  2.  configure the alarm to trigger at a specific time, e.g., 8:30.

I’m using the following registers:

  • Register B for setting the seconds alarm
  • Register C for setting the minutes alarm
  • Register D for setting the hours alarm

Then I'm using register 0x01 with the value 0x80 to set the alarm interrupt .

The alarm does not trigger at the specified time. Can suggest the correct procedure to set up an alarm?

Thanks!

0 项奖励
回复
1 回复

1,407 次查看
diazmarin09
NXP TechSupport
NXP TechSupport

Hello Vaishali9,

I hope all is great with you. Thank you for using the NXP communities.

Are you enabling the ALARM interrupt?

                control_2 = RTC_CTRL_2_DEFAULT | RTC_ALARM_AIE;         // enable interrupt

                control_2 &= ~RTC_ALARM_AF;   

 

I do recommend using the following example code as a reference for your design.

https://github.com/SolderedElectronics/PCF85063A-Arduino-Library/blob/master/PCF85063A.cpp

Please note that this is not an official driver.

I hope this information helps.

Regards,

David

0 项奖励
回复