# TIMER interrupt

Hello all,

I have a simple question regarding the timer interrupts. Is there a way to further decrease the ISR call beyond using the TIMER1 letting it to overflow? (around 4.19s for the max 1024 prescaler available and 16MHz crystal) ?

Or the only alternative is to do a if routine in the loop() to check if the millis()-variable is higher than a certain value?

thank you

Is there a way to further decrease the ISR call beyond using the TIMER1 letting it to overflow?

I recognize all the words. The arrangement makes no sense.

What ARE you trying to do?

...R

Thanks for the replies. What I want is to call a specific code in a regular interval. Let say I need 15s interval, is there a way to get it done by using timer1? I guess not and the only way is to declare a variable and compare with millis() but want to know if I'm wrong or not.

What I want is to call a specific code in a regular interval...is there a way to get it done by using timer1?

Yes.

Is there a way to further decrease the ISR call beyond using the TIMER1 letting it to overflow?

I still don't understand what this means.

I think he wants an interrupt to occur less often than 62.5ns (clock cycle) * 1024 (max prescalar) * 65536 (16-bit timer overflow) = 4.2 seconds.

If I'm guessing your intent correctly, just add a second counter inside the ISR and increment it each time you get an interrupt. Then can count you interrupt big to infinite nearly.

I was following that right up to:

Then can count you interrupt big to infinite nearly.

You lost me.

If you want to do things at a 15 second (or even 0.15 second) interval there is no need for interrupts. Just use millis() as illustrated in several things at a time.

Interrupts are generally only needed for microsecond precision.

...R