Hello
it will be my first time using arduino mega.
Well, I want to use the arduino on sleep mode and wake up the MCU using an interrupt signal from DS3231 module.
So, my question is: Which pins could I connect the INT signal from the DS3231 module in ATmega2560 ?
Here is the pinout
Thx
Any of the PCINTn pins (these will generate an interrupt when the pin status changes, so both the start and end of an alarm condition, so your code needs to determine which pin triggered it if you enable more than one PCINT in a given bank of them) or the INTn pins (but only a low level interrupt can trigger this, and will do so continuously, so you might need to turn them off in the interrupt and then reenable them - it wasn't immediately clear how long the DS2313 asserts the interrupt pin for).
The latter can be used with attachInterrupt() - but I consider that to be an abomination.
DrAzzy:
Any of the PCINTn pins (these will generate an interrupt when the pin status changes, so both the start and end of an alarm condition, so your code needs to determine which pin triggered it if you enable more than one PCINT in a given bank of them) or the INTn pins (but only a low level interrupt can trigger this, and will do so continuously, so you might need to turn them off in the interrupt and then reenable them - it wasn't immediately clear how long the DS2313 asserts the interrupt pin for).
The latter can be used with attachInterrupt() - but I consider that to be an abomination.
Thanks. Yes, Interrupt pin is Active-low and Also I don't know the time of Interrupt signal. I can't find the information on datasheet. I guess if the interrupt signal is 1 second duration in low state It will be okay.