View Single Post
  #9   Spotlight this post!  
Unread 02-12-2004, 19:33
Dave Flowerday Dave Flowerday is offline
Software Engineer
VRC #0111 (Wildstang)
Team Role: Engineer
 
Join Date: Feb 2002
Rookie Year: 1995
Location: North Barrington, IL
Posts: 1,366
Dave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond repute
Re: Is there a built in tick/millisecond counter?

Quote:
Originally Posted by Al Skierkiewicz
Isn't there a time mark on the dashboard port data stream?
Yes, in a way. Each packet coming in to the RC (and leaving, for that matter) has a packet number associated with it. It's an 8-bit number that increments for each packet. There are 40 packets per second, so 1 bit in the packet number represents about 25 milliseconds. If your timing needs do not require high accuracy and/or are very coarse (i.e. you want to do something every 500 milliseconds or something), this could be a simple way to do it. There are some gotchas, though: since it is an 8 bit number it does overflow about every 4 seconds which means if you do try to use it as a timer you'll have to handle that overflow. Also if a packet is corrupted or not received it will not be passed to the user processor, so if you have a bad radio link there will appear to be gaps in the packet numbers. If you take that all into account in your software though then it can have its uses. I think we may have used it as a rudimentary timer in our RC last year ourselves.