This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

TIMER INTERRUPT

Well, I am a newbie and I am confused about the timer interrupt. I want to make the timer interrupt every second with 10 Mhz crystal.
I am confused about Prescaler and MR registers.
This is my code but I am not sure about the timing that the code make the ISR.
#define TMR_CLK 80000000 TIM0_PR = (TMR_CLK / 5000000) - 1; TIM0_MR0 = 1; TIM0_MCR = 1; /* On Match 0 event reset timer */ TIM0_INT_SET_ENABLE = 1; TIM0_TCR = 1; /* Start Timer 0 */

Does anybody have the timing formule?

0