Go to Post This is going to be leet. Or something like that. I can't wait. - Billfred [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #16   Spotlight this post!  
Unread 24-03-2007, 00:24
dragoonex's Avatar
dragoonex dragoonex is offline
Registered User
FRC #1325 (Inverse Paradox)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2006
Location: Canada
Posts: 9
dragoonex is on a distinguished road
Re: Anyone actually using hardware timers?

We implemented Timers into our code this year, and they are great. We set ours to fire off every millisecond. Unfortunately, we didn't have the time, but we plan to write a wrapper around one timer so we can schedule "events" to happen at certain time intervals. But so far, the timers have been proven to be extremely useful and you should definitely implement them.

Some tips, your interrupt routine should be fast. In fact, you should really only be really incrementing a number in it. Remember that since your timer is firing every X milliseconds, your number is being increased very rapidly. So use a big type like a long, or a long short. These will last your for days.

Also, always, always, always, disable your timer interrupts before trying to access your "tick" variable. Bad things will happen if you don't.
 


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
Are you actually using bumpers? Chriszuma Technical Discussion 28 16-02-2006 18:41
Using Timers psquared Programming 9 30-01-2006 10:29
IS ANYONE USING PNUEMATICS archiver 2001 14 24-06-2002 00:18
Does anyone know what actually happened...? Adam Y. Regional Competitions 7 30-03-2002 01:48
Does anyone actually plan on playing rough? Joe Menassa General Forum 10 10-02-2002 05:09


All times are GMT -5. The time now is 20:15.

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