pimoroni / rv3028-python

Python library for the RV3028 Real Time Clock
MIT License
10 stars 8 forks source link

What is the purpose of the INT pin? #3

Open Nic2012 opened 5 years ago

Nic2012 commented 5 years ago

Hi, could you give some explanation how we can use the 4th pin INT on the breakout. Thanks and best regards, Nic

Gadgetoid commented 5 years ago

It's only useful if you're hooking it up to some device that can handle an external interrupt for wake-up. IE: On the Raspberry Pi it doesn't really serve much of a purpose so we don't (yet) have an example of this. Not that you couldn't use it anyway.

The rv3028 is capable of asserting the interrupt pin for things like periodic countdown timers, alarms, time update intervals and more. This is all detailed in the datasheet - https://www.microcrystal.com/fileadmin/Media/Products/RTC/App.Manual/RV-3028-C7_App-Manual.pdf - but I appreciate that's heavy reading if you're just looking for something interesting to do with the pin.

What's your application?

Nic2012 commented 5 years ago

My first thoughts: does it interfere with the onoff-shim when its additionally attached on pi (https://shop.pimoroni.com/products/onoff-shim) it listens on pin4 to trigger a shutdown.

Because the rv3028 has very low current consumption, to control a long term timelapse with precise time intervals would be an application.

Gadgetoid commented 5 years ago

It should be possible to accomplish this, but not with the module alone. The interrupt pin would have to trigger the on state, and the Pi would have to execute its task and shutdown automatically.

It might be possble to wire it directly to the "BTN" header of OnOff SHIM.