|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||||
|
|||||
|
User Processor Execution Time
How long does it take a single loop to execute when called in user_routines.c?
Basically, in Process_Data_From_Master_uP, I am calling a function that multiplies my interrupts by 38, to get interrupts a second, and eventually, revolutions per second. If I call this important function in Process_Data_From_Master_uP, will it execute at a consistent 38 Hz? Or do I need to put it in User_routines_fast.c? And How would I do that? Thanks much. Code:
unsigned int Get_Wheel_Speed(void)
{
return((Get_Interrupt1()*38));
}
|
|
#2
|
|||||
|
|||||
|
Re: User Processor Execution Time
The frequency is consistent, but only on average. You can't count on it being exactly 26.2 milliseconds between calls. And if there's a communication glitch, one or more calls might be skipped entirely.
For what you're doing, you probably should use a timer interrupt. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Cup Finals Time | Lil' Lavery | Chit-Chat | 6 | 09-06-2004 20:15 |
| **FIRST EMAIL**/Team Forum Dates and Locations Announced! | Damian Manda | FIRST E-Mail Blast Archive | 2 | 22-05-2004 10:08 |
| All right - it's that time of the year for... | Matt Attallah | Chit-Chat | 6 | 08-04-2004 01:20 |
| time change... | David Kelly | Chit-Chat | 9 | 01-11-2001 11:20 |