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

Back to Subject List

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


 
#69177 - RE: how can a slow pulse period be known?
Responding to: ???'s previous message
Yes the period is from rising to rising edge. You can also define this period from the falling edge to the next falling edge.

The best scheme is to use an input capture register off a TIMER 2. Initialize T2 to free run in 16 bits mode. Arm a T2 overflow interrupt to respond to T2 rolling over from 0FFFFH to 00000H. In this overflow interrupt increment a memory variable by a count of 1. Use either a byte of word counter. Use the T2 input to capture the first edge time snapshot and generate an interrupt when this happens so you can save the capture value to some memory locations (16 bits from the capture register plus the additional 8 or 16 bits of the overflow counter). A second input capture interrupt will give you an additional 16-bit capture and an additional current value for the overflow counter. Subtract the first saved time value from the latter 24 ot 32 bit value to get the total period.

There is a very helpful document all about timer usages here....

http://www.intel.com/design/MC...085101.PDF

and here....

http://www.smartec.nl/pdf/appsmt01.pdf

Michael Karas


List of 9 messages in thread
TopicAuthorDate
how can a slow pulse period be known?            01/01/70 00:00      
   RE: how can a slow pulse period be known?            01/01/70 00:00      
   RE: how can a slow pulse period be known?            01/01/70 00:00      
      RE: how can a slow pulse period be known?            01/01/70 00:00      
         RE: how can a slow pulse period be known?            01/01/70 00:00      
            RE: how can a slow pulse period be known?            01/01/70 00:00      
               RE: how can a slow pulse period be known?            01/01/70 00:00      
   RE: how can a slow pulse period be known?            01/01/70 00:00      
      RE: how can a slow pulse period be known?            01/01/70 00:00      

Back to Subject List