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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
11/03/03 04:37
Read: times


 
#57711 - RE: timer2 period code problems for rpm meas
Responding to: ???'s previous message
Marc:
Is it possible that the 16-bit timer 2 counter is overflowing multiple times during the period from capture 1 time to capture 2 time. If so then this could explain why the readings you are getting dont make too much sense.

If this is what is happening then there is a relatively simple technique used to solve the problem. Try to arrange it so you also get an interrupt when the timer overflows. At each overflow interrupt you increment a memory byte which effectively adds another 8 bits to the timer 2 counter resolution. Then at the capture handler when you subtract the "starting capture value and the ending capture value" extend the math out to handle 24 bits of computation.

Michael Karas


List of 13 messages in thread
TopicAuthorDate
timer2 period code problems for rpm meas            01/01/70 00:00      
   RE: timer2 period code problems for rpm meas            01/01/70 00:00      
      RE: timer2 period code problems for rpm meas            01/01/70 00:00      
   RE: timer2 period code problems for rpm meas            01/01/70 00:00      
      RE: timer2 period code problems for rpm meas            01/01/70 00:00      
         RE: timer2 period code problems for rpm meas            01/01/70 00:00      
      RE: timer2 period code problems for rpm meas            01/01/70 00:00      
         RE: timer2 period code problems for rpm meas            01/01/70 00:00      
            RE: timer2 period code problems for rpm meas            01/01/70 00:00      
               RE: timer2 period code problems for rpm meas            01/01/70 00:00      
               RE: timer2 period code problems for rpm meas            01/01/70 00:00      
                  RE: timer2 period code problems for rpm meas            01/01/70 00:00      
                     RE: timer2 period code problems for rpm meas            01/01/70 00:00      

Back to Subject List