I was looking at an example we did in class and the processors clock speed is 24MHz. I need to create a timer that generates an interrupt at 100 Hz.
What was done in the example is divide clock freq by the desired interrupt so 24MHz / 100Hz = 240,000. It then says to use a /8 prescaler so you do 24MHz / (8*100Hz) = 30,000. So the timer is equal to 30,000. What I dont understand is how the prescaler is determined. How do you know what prescaler to use?
The example says it used a /8 prescaler because "timer can only divide by 1 to 65,536, so use /8" I dont know what this means. Thanks in advanced