Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
01/29/09 16:12
Read: times


 
#161825 - 321 Interrupts
Responding to: ???'s previous message
You mentioned 321 interrupts......did you actually mean 321 interrupts per second?

Some sanity check things to investigate:

1) Does the Timer 2 in the published example you are referenced clock at the same rate as your setup??

2) Does Timer 2's clock really happen at the XTAL frequency??

If the reference example clocked at the same 12.58 MHz as your setup AND the Timer 2 was clocking at 1/12 th of the XTAL rate the the 321 computation may be incorrect. It just so happens that 321 / 12 == 26.75 which is a whole lot closer to ~20Hz!!

Often times in working with the timer it is useful to read data sheet to understanding what you think to be true, then make up some test code and try out on target platform. Toggle some port pin and measure on an oscilloscope to see if your understanding was correct. Even experienced folks will find they are off by some factor as they missed some detail such as the timer clock being prescaled by a divide by two or some other strange factlett.

Michael Karas


List of 12 messages in thread
TopicAuthorDate
ADUC845 Timer2 Control Basics            01/01/70 00:00      
   Well well...            01/01/70 00:00      
   I'm guessing you already know..            01/01/70 00:00      
      Doesn't clarify why that value            01/01/70 00:00      
         the absolute duration of one timer tick...            01/01/70 00:00      
            not important, but what is            01/01/70 00:00      
            The timer tutorial was not helpful            01/01/70 00:00      
   It's the math that doesn't seem to work            01/01/70 00:00      
      321 Interrupts            01/01/70 00:00      
         Experimental path probably best            01/01/70 00:00      
      BTW - XLS Modeling            01/01/70 00:00      
         Timer counters connected to PLL            01/01/70 00:00      

Back to Subject List