15 minutes?
that is long
set up timer, can choose any timer u like, the best is timer1, because it has 16 bit register
choose the largest pre scaler
make some calculation on the time the overflow occur, and goes into interrupt subroutine
However, the interrupt frequency is definitely far less than 15 minutes
so, u assign an long integer, say i. You increment i everytime interrupt occur. I guess the time is still not long enough
You declare another long integer j, j increment everytime i overflow, that is, back to 0.
If the time still not enough, then declare another long int, keep doing it until u get 15 minutes
However, if you microcontroller's function is just checking the input, and has nothing else to do, then u can just put a delay, lets say 1 second.
make a while loop that check the pin after every second, and do the for loop for 15*60 times. If there is input, then come out from the while loop.