View Single Post
  #3   Spotlight this post!  
Unread 09-02-2004, 18:28
Rickertsen2 Rickertsen2 is offline
Umm Errr...
None #1139 (Chamblee Gear Grinders)
Team Role: Alumni
 
Join Date: Dec 2002
Rookie Year: 2002
Location: ATL
Posts: 1,421
Rickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant future
Send a message via AIM to Rickertsen2 Send a message via Yahoo to Rickertsen2
Re: How to measure execution time? And code size?

Quote:
Originally Posted by gnormhurst
Can someone describe a simple way to measure how much of the 26 ms time budget is being used? As I add code I would like to know how close I am coming to the limit.

Also, how do I know how close I am to the memory limits for code and data?

Thanks all,
Norm
I wouldn't worry too much about the 26 ms. If your code starts running over, then simply write some timer based code, that automatically sunchs w/the master provessor at least every 26ms. Use a backbuffering system, where you keep two copies of your data to send, a "im still working on this data" copy and a "this data is ready to send off" copy". You have a timer interrupt based function that is called every 25 ms or so that sends of the completed set of data automatically. When you have new data, you swap out the two sets. Take as much time as you want processign and don't worry about the 26ms. I would recommend you try to keep things under 26 ms, but if you can't then the above will work just fine. The way we measure the 26 ms time is by pulsing one of the IO lines each tiem data is sent off. That line is hooked up to a frequency counter. Thats the easiest wya if you have a frequency counter, or at the very least an oscilliscope.
__________________
1139 Alumni