Go to Post Great. Just what we need. DHS showing up at all the regional competitions. . - dlavery [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 31-01-2008, 13:33
Abrakadabra Abrakadabra is offline
Here We Go !!!
AKA: Scott Kukshtel, Mr. K
FRC #3467 (The Windham Windup!)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2002
Location: Windham, New Hampshire
Posts: 160
Abrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant future
Regularity of RepeatingTimer interrupts?

How accurate can I count on the trigger timing of ISRs registered with RegisterRepeatingTimer() to be?

I have the idea of using a repeating timer to do regular velocity calculations on the two quad encoders attached to my gear boxes. Basically the ISR would read the encoder counts, subtract the previous counts from each to get the differences, and divide by the repeating timer interval (most likely 256ms, so I can divide using bit shifting). The resulting velocities would be stored in global variables to be accessed by my PID code running in the "default" loop.

Will this work?
  #2   Spotlight this post!  
Unread 04-02-2008, 07:42
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 592
BradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant future
Re: Regularity of RepeatingTimer interrupts?

The code resets the timer value as the first thing when the interrupt occurs, so it should stay pretty accurate. I would think it would be close enough for the calculations that you need to do.
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute
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
Multiple Interrupts windell747 Programming 13 03-02-2008 03:52
Interrupts JSonntag Programming 1 14-01-2006 12:43
Using Interrupts Leav Programming 1 14-02-2005 07:22
Interrupts CyberWolf_22 Control System 3 12-01-2004 21:46


All times are GMT -5. The time now is 19:13.

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