I made a delay in 2 ways and one is working fine but the other one doesn't work. I use the atmega328.
My delay must be 1.6 sec. but with the non working it is much less than that and from my opinion it must be the same.
The difference between the two is that in the working one I use a register Count in the upper register (r23). The non working has the register Count in the lower register (r13).
I can not find out what I'm doing wrong here.
Can anybody give me a clue or a push in the right direction so I can solve this problem.
I include a piece of code that only shows the counter in the interrupt.
Already thanks for the help,