Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alarm 2 gives wrong Alarm bits back #7

Closed
SimGas opened this issue Nov 30, 2017 · 6 comments
Closed

Alarm 2 gives wrong Alarm bits back #7

SimGas opened this issue Nov 30, 2017 · 6 comments

Comments

@SimGas
Copy link
Contributor

SimGas commented Nov 30, 2017

Hi,

I discovered that Alarm 2 gives wrong alarm bits back when reading them. I'm not sure if the wrong bits are written to the controller or if just the reading is wrong. but I think its a combination of both problems.
Alarm 1 works totally fine

@tichachm
Copy link

tichachm commented Jan 5, 2018

Hi,
I also have a problem with Alarm 2. I would like to run the alarms every day (hour, minute match), but Alarm 2 is triggered every hour (minute match).

Here is my code adding the Alarm:
Clock.setA2Time(0, 14, 02, 100, true, false, false);

Alarm 1 is working fine.
Thanks

@SimGas
Copy link
Contributor Author

SimGas commented Jan 5, 2018

Have you tried reading the Alarm2 bits? Do they show the same value as you gave them(100)?

@tichachm
Copy link

tichachm commented Jan 6, 2018

Yes, the bits returned show 96
I think it should be 4 or 100.

@SimGas
Copy link
Contributor Author

SimGas commented Jan 6, 2018

Can you try the following:

Clock.setA2Time(0, 14, 02, 0b1000000, true, false, false);

In my code I use sucessfully the following:

rtc.setA1Time(0, 0, 0, 10,0b00001110, false, false, false); // 1110 means: Alarm, when seconds(10) match
rtc.setA2Time(0, 0, 0, 0b1110000, false, false, false); //111 means: Alarm every minute, at second 00

@tichachm
Copy link

tichachm commented Jan 7, 2018

Hi SimGas,
I changed the value to 0b1000000 it seems to work fine, thanks for your help.

@awickert
Copy link
Member

Thanks, folks, for helping each other!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants