|
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.
|