Things to check:
I recommend declaring tick_1sec
as volatile
to prevent the compiler of hyper-optimizing that register.
What is your clock frequency? Your ISR will deliver 1s calls only if your CPU frequency is 16MHz (==> 16.000.000 / 1024 / 15624)
You might have a LED in your hardware which you can invert from a) the ISR
b) within the first if ()
in main
to see if this is ever reached.
update: "volatile"
The link provided by @skyrift in his comment is very worth reading.
When you use Atmel Studio, compile your code once with/without the volatile
keyword and compare what the compiler is doing ==> Solution explorer / Output Files / *.lss ... you will see each C statement and how the compiler converts it to machine code ... an exercise worth once in a while when working with micros ...