Hank WAIT!!! (drama over)
Before you change anything, play with your preload. you still only have 32 instructions between interupts. Do you understand why?
Timers are this: they always count up and flag int when they rollover to 0. when set up to clock from fosc/4, this means 1 count per ASM instruction. so you are at 2Mips, so (1/2,000,000)*count is your int frequency. in your case count = 32 which = 16uSec. or 62.5K.
So the question is why is yours 5.32K? I believe it is because you are actaally taking longer to get there AND longer in the int, so your numbers are skewed.
Play with the preload until you get numbers that make sense. Then work from there.![]()
Bookmarks