timer compare value that changes?

Is it possible to specify a time value you want an interrupt to occur that is set while the program is running.

when timer = X; run ISR

X=X + 1000;

Do you mean with a hardware Timer of the ATmega chip ? The registers can always be written, it doesn't matter if the timer is running.

That is why there is a rollover problem sometimes. Suppose a 8-bit timer was counting up to 40 and is at the moment at 35. When the a new value of 29 is written, the timer will count all the way up to 255 and then from 0 to 29. To avoid that, the new value should be written in the ISR, when the counting is for example at 0. The section in the datasheet for timers is large, because of all the possibilities and to avoid these specific Timer problems.

Is it possible to specify a time value you want an interrupt to occur that is set while the program is running.

You can call a function every so often using millis(). This would not be an interrupt. See the Blink without Delay example.

calvingloster: Is it possible to specify a time value you want an interrupt to occur that is set while the program is running.

If you know when it should run it is unlikely you will need an interrupt. Interrupts are normally used for something unpredictable AND short lived.

Tell us what you want to achieve rather than how you think it should be achieved

...R

calvingloster: Is it possible to specify a time value you want an interrupt to occur that is set while the program is running.

when timer = X; run ISR

X=X + 1000;

Yes, it is possible.

calvingloster: Is it possible to specify a time value you want an interrupt to occur that is set while the program is running.

when timer = X; run ISR

X=X + 1000;

Here is a pretty good example of interrupt timers, it explains configuring it.

Be wary of how they may affect other functionality on your arduino.