Hi, will there be a Alarm 1 and 2 Reset component available in the near future for the DS3231?
Regards,
Pierre
DS3231 Alarm Reset component
-
Matrixv8
- Posts: 18
- http://meble-kuchenne.info.pl
- Joined: Mon Jun 03, 2024 2:51 am
- Been thanked: 4 times
-
mnfisher
- Valued Contributor
- Posts: 1714
- Joined: Wed Dec 09, 2020 9:37 pm
- Has thanked: 146 times
- Been thanked: 799 times
Re: DS3231 Alarm Reset component
Hi Pierre,
It would be fairly easy to either make an addition to the current component - or for testing purposes a separate component (I've done this to use the ds3231 temperature sensor).
I'll have a look.
I see you've managed using the i2c component....
Martin
It would be fairly easy to either make an addition to the current component - or for testing purposes a separate component (I've done this to use the ds3231 temperature sensor).
I'll have a look.
I see you've managed using the i2c component....
Martin
-
mnfisher
- Valued Contributor
- Posts: 1714
- Joined: Wed Dec 09, 2020 9:37 pm
- Has thanked: 146 times
- Been thanked: 799 times
Re: DS3231 Alarm Reset component
Hi Pierre,
I added an AlarmReset and SetMinuteAlarm to my DS3231 temperature component.
It would be nice to have a more general SetAlarm(time (& date)) function.... Also - in the test program - I would probably sleep the MCU rather than busy waiting for the alarm to occur.
I used an interrupt (on an Arduino - Pin2) - which would wake the MCU ( I wasn't sure which MCU you used?)
The DS3231Temp MUST have the same i2c settings as the DS3231 component (speed etc).
It would be possible to test which alarm is triggered (1, 2) by reading the status register (0x0F) and testing bits 0 and 1 - if needed.
To use the component - copy the fcpx file to a directory and point to it in build->Customise->Look for components in.... (Then restart FC or do refresh components) - search for DS3231
I also set a time at the start of the demo - remove this - I found a board without a battery
Martin
I added an AlarmReset and SetMinuteAlarm to my DS3231 temperature component.
It would be nice to have a more general SetAlarm(time (& date)) function.... Also - in the test program - I would probably sleep the MCU rather than busy waiting for the alarm to occur.
I used an interrupt (on an Arduino - Pin2) - which would wake the MCU ( I wasn't sure which MCU you used?)
The DS3231Temp MUST have the same i2c settings as the DS3231 component (speed etc).
It would be possible to test which alarm is triggered (1, 2) by reading the status register (0x0F) and testing bits 0 and 1 - if needed.
To use the component - copy the fcpx file to a directory and point to it in build->Customise->Look for components in.... (Then restart FC or do refresh components) - search for DS3231
I also set a time at the start of the demo - remove this - I found a board without a battery
Martin
- Attachments
-
- DS3231TempSensor.fcpx
- (3.44 KiB) Downloaded 8 times
-
- DS3231Temp.fcfx
- (19.99 KiB) Downloaded 7 times
-
- DS3231_Alarm_Test.fcfx
- (16.31 KiB) Downloaded 6 times
Re: DS3231 Alarm Reset component
Wow!, thank you Martin, I will test it tomorrow morning.
Regards,
Pierre
Regards,
Pierre
-
mnfisher
- Valued Contributor
- Posts: 1714
- Joined: Wed Dec 09, 2020 9:37 pm
- Has thanked: 146 times
- Been thanked: 799 times
Re: DS3231 Alarm Reset component
Let us know....
I thought - ResetAlarm - should return the alarm that was set?
It would (of course) be better integrated into the component!
Martin
I thought - ResetAlarm - should return the alarm that was set?
It would (of course) be better integrated into the component!
Martin
Re: DS3231 Alarm Reset component
Hi Martin, the program works perfectly. I believe that the problem I had with the DS3231 component earlier is that the alarm does not reset (no Reset option) and that the Int pin on the chip is low all the time. I was able to confirm that by writing to the chip register output pin to set it to high and then the alarm would work.
So if you happen to update the DS3231 component with the new features it would be amazing.
Thank you for all your help.
Regards,
Pierre
So if you happen to update the DS3231 component with the new features it would be amazing.
Thank you for all your help.
Regards,
Pierre