redhawk87 Posted May 4, 2012 Posted May 4, 2012 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
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now