8Mh/4 = 2000000 op per s.
1:128 prescale = 2000000/128 = 15625 per s.
Preload with 98, 158 counts.
15628 / 158 = 98.89 Hz
1000ms/100 = 10ms
What's wrong?
8Mh/4 = 2000000 op per s.
1:128 prescale = 2000000/128 = 15625 per s.
Preload with 98, 158 counts.
15628 / 158 = 98.89 Hz
1000ms/100 = 10ms
What's wrong?
You left out that vital bit of information (the 1:128 prescale).
So, it's happening every 1ms instead of 10ms?
Are you sure you're correctly clearing/re-enabling the correct interrupt after you are done processing the interrupt...or is the interrupt sequence 'jumping right back into itself' after you are done processing it?
Last edited by skimask; - 19th August 2008 at 16:07.
Bookmarks