How to implement interrupts at regular interval of 1msec,5msec and 7msec using a single timer?
Use a 1ms interrupt, Increment a counter and check for (Counter % 5) == 0
Call your interrupt handler when zero, same for %7
But what i need is to have seperate ISRs. And 5msec interrupt will have more priority than 1 msec one.
Do i have to use control registers or is there any other option?.
Under that premises you will need 3 individual timers, although I (personally) would do that in software.
The priority can be handled in software too (just check for timestamp%7 first).
Having separate timers makes it more difficult to have them synchronized.