Jump to content

Need help with determining the prescale to use when determining the value to set for interrupts on processors

Featured Replies

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

Archived

This topic is now archived and is closed to further replies.

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.