Go to Post We win as a team and lose as a team. - Zuhaib Ali [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 23-01-2007, 17:42
bruss6's Avatar
bruss6 bruss6 is offline
Registered User
FRC #0843 (Wildcats)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2005
Location: Canada
Posts: 16
bruss6 is an unknown quantity at this point
A simple accurate timer

What is the easiest and most accurate delay function or a timer in the user routines_fast.


P.S. One more question... Are there any rules against the use of last year's(2006 kevin's) program???

Thanks

Ben Russell
  #2   Spotlight this post!  
Unread 23-01-2007, 18:08
Kevin Sevcik's Avatar
Kevin Sevcik Kevin Sevcik is offline
(Insert witty comment here)
FRC #0057 (The Leopards)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Houston, Texas
Posts: 3,721
Kevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond repute
Send a message via AIM to Kevin Sevcik Send a message via Yahoo to Kevin Sevcik
Re: A simple accurate timer

If you need an accurate timer, you need to use one of TIMER0-4. IFI has examples on their website under White Papers. They're easier than you might think. There is otherwise no way to accuratly time things in the Process_Data_From_Local_IO() function as it simply runs as fast as it runs. If you're talking about timing things in the User_Autonomous() function, you can put a simple counter inside the slow loop and it will increment once every 26.2 ms. So that's a pretty accurate and simple, if slow, timer.
__________________
The difficult we do today; the impossible we do tomorrow. Miracles by appointment only.

Lone Star Regional Troubleshooter

Last edited by Kevin Sevcik : 23-01-2007 at 18:34.
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Timer questions Rick TYler Programming 3 12-02-2006 19:24
Gyro not accurate - Problem naor52 Programming 15 27-01-2006 16:50
Divisions at Atlanta - Accurate Spreadsheet Bharat Nain Championship Event 13 12-04-2004 10:21
timer omega Programming 3 30-03-2004 18:52


All times are GMT -5. The time now is 23:49.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi