I want my program to call a specific function every one second and I don't want to use `delay_ms()`. I set internal 8 MHz oscillator as the source of clock. I think I must use timer interrupts, but I don't have any idea if is it possible to generate exactly 1 second delays or not.
May I ask you to help me handle it. The origin problem is to calculate average of a sine input signal for one second and send that average to the computer using USART protocol. because of this I don't want to use `delay_ms()` function. I want to calculate the average in my program `while()` loop and then every 1 second the interrupt send the result to COM port and also to my 2*16 LCD.
Thanks in advance.