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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
07/27/04 03:50
Read: times


 
#74938 - RE: single crystal
Responding to: ???'s previous message

You can make the tick counter as large as you consider necessary - say you want 1/1000th second resolution for 1 day -
1000 * 60 * 60 * 24 = 86400000. Then you would have a 32 bit tick counter.

Also consider that you only want to keep track of the lap time so using a 16 bit counter would keep track of a maximum lap time of 65.535 seconds so in this instance maybe a 24 bit counter would be the minimum.

In your example of 41 carts - we would have to read the status of 5 8bit ports - a total of 10 cpu cycles at 1uS/cycle gives us a variance of about 10uS - 1/100000th of a second. As Bartosz pointed out not even the professionals time down to this level!

You need to think clearly about the problem you're trying to solve - your current systems samples the interrupt input once per machine cycle (~1uS) which Bartosz explains is way in excess of your requirement, my suggestion samples at 500 times a second. My psuedocode example just about writes the code for you!

List of 18 messages in thread
TopicAuthorDate
single crystal            01/01/70 00:00      
   RE: single crystal            01/01/70 00:00      
      RE: single crystal            01/01/70 00:00      
         RE: single crystal            01/01/70 00:00      
            RE: single crystal            01/01/70 00:00      
   RE: single crystal            01/01/70 00:00      
   RE: single crystal            01/01/70 00:00      
   RE: single crystal            01/01/70 00:00      
      RE: single crystal            01/01/70 00:00      
   RE: single crystal            01/01/70 00:00      
      RE: single crystal            01/01/70 00:00      
         RE: single crystal            01/01/70 00:00      
            RE: single crystal            01/01/70 00:00      
            RE: single crystal            01/01/70 00:00      
               RE: single crystal            01/01/70 00:00      
                  RE: single crystal            01/01/70 00:00      
            RE: single crystal            01/01/70 00:00      
               RE: single crystal            01/01/70 00:00      

Back to Subject List