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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
07/26/04 18:48
Read: times


 
#74916 - RE: single crystal
Responding to: ???'s previous message
I dont understand how to keep track of every kart,
The distinction is that you are running the timer continuously and checking all of the karts on every timer tick. You do not want to interrupt when the karts pass. The ideal timer tick is probably around .001 second to .01 second.

On every timer tick, read the 12 bits representing the kart sensors. Keeping the interrupt code as short as possible, pass these 12 bits back to 'main' along with the actual time of that tick. Use a ring buffer or FIFO if you're not sure that 'main' will get to it before the next tick.

In 'main', determine if any of the sensor readings is 'new', and record the kart number along with its time into the log.

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