Re: Need to run function every 20ms.
- From: "Allan Lunk" <allan _at_ ByteWiseSG _dot_ com>
- Date: Sun, 30 Dec 2007 19:53:28 -0500
Thx Chris
That looks perfect--not sure how I missed it.
"<ctacke/>" <ctacke[at]opennetcf[dot]com> wrote in message
news:O5n5II0SIHA.4752@xxxxxxxxxxxxxxxxxxxxxxx
Take a look at the multimedia timer. Set it for a 20ms periodic firing.
--
Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com
"Allan Lunk" <allan _at_ ByteWiseSG _dot_ com> wrote in message
news:%23q7qS3zSIHA.5524@xxxxxxxxxxxxxxxxxxxxxxx
Hi,
I have read numerous posts asking similar questions, but my problem is
slightly different.
I have a function (thread) that needs to run every 20ms. I am reading
some counters and ADCs and up-dating some I/O based what I read. It is
important that I read things as regularly as possible. The function
takes several ms (varies) to complete, depending on what it need to do.
I can't (I think..) use Sleep(20), because this will start the 20 ms
after the function completes--and that time varies.
Is there a way to generate a consistent...something.... that will allow
my thread to sample and update I/O?
BTW. I don't have a timer on board that I can use to generate another
interrupt--this may need to change if I can't come up with another way.
thanks for any suggestions.
.
- References:
- Need to run function every 20ms.
- From: Allan Lunk
- Re: Need to run function every 20ms.
- From: <ctacke/>
- Need to run function every 20ms.
- Prev by Date: Re: Need to run function every 20ms.
- Next by Date: Re: Compile error with VS2005, but OK with EVC
- Previous by thread: Re: Need to run function every 20ms.
- Index(es):
Relevant Pages
|
Loading