Hi friends,
I want to make serial communication(RS232) the most important task of CPU. I
mean, any task other than serial communication(be it usb, printer, display,
keyboard, mouse etc) should be done only after serial communication is done.

What steps can I do to realize this? Any comment is greatly appreciated.
Thanks..

Re: How to do Priority Assignment? by Bruce

Bruce
Fri Apr 06 07:38:40 CDT 2007

Set the thread priority of threads that are important to you system higher
than other threads. See CeSetThreadPriority(). You can also adjust the
thread quantum.

--
Bruce Eitman (eMVP)
Senior Engineer
beitman AT applieddata DOT net

Applied Data Systems
www.applieddata.net
An ISO 9001:2000 Registered Company
Microsoft WEP Gold-level Member

"bunymn" <bunymn@discussions.microsoft.com> wrote in message
news:2BB346ED-C403-431A-8D5E-5918D99C5215@microsoft.com...
> Hi friends,
> I want to make serial communication(RS232) the most important task of CPU.
> I
> mean, any task other than serial communication(be it usb, printer,
> display,
> keyboard, mouse etc) should be done only after serial communication is
> done.
>
> What steps can I do to realize this? Any comment is greatly appreciated.
> Thanks..



RE: How to do Priority Assignment? by BillT

BillT
Fri Apr 06 09:05:26 CDT 2007

If you are using standard CE serial drivers, the "Priority256"=dword:67 entry
in the platform.reg subkey entry for the particular serial port controls the
thread priority.

"bunymn" wrote:

> Hi friends,
> I want to make serial communication(RS232) the most important task of CPU. I
> mean, any task other than serial communication(be it usb, printer, display,
> keyboard, mouse etc) should be done only after serial communication is done.
>
> What steps can I do to realize this? Any comment is greatly appreciated.
> Thanks..

Re: How to do Priority Assignment? by Dick

Dick
Fri Apr 06 13:56:37 CDT 2007

Hi,

I have example code on my site. Follow the PC Data Acquisition link to
"Rea-time." However, read the caveats...

Dick

--
Richard Grier, MVP
Hard & Software
Author of Visual Basic Programmer's Guide to Serial Communications, Fourth
Edition,
ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March
2006.
See www.hardandsoftware.net for details and contact information.



Re: How to do Priority Assignment? by Dick

Dick
Fri Apr 06 14:05:44 CDT 2007

Opps, I didn't realize I was reading a CE group. Cancel my other reply.

However, it isn't obvious why you would loose data from a serial
application. First and foremost, high-speed serial data (almost) aways
requres flow control to avoid data loss, no matter what priority is used by
your application or receive thread. Hardware flow control is best
(RTS/CTS). Even if you give your application/thread real-time priority, you
may still run into issues -- and you may well cause trouble for other things
executing. You can give the thread reading data higher priority, but at the
end-of-the-day, this may not be a real solution.

You may need to look at your application to make sure that it is coded in an
efficient way. If you are attempting to make real-time changes to some UI
based on data that you receive, or if your receive data process is "heavy,"
you may need to do something to make it more efficient or at least less
obtrusive.

Dick

--
Richard Grier, MVP
Hard & Software
Author of Visual Basic Programmer's Guide to Serial Communications, Fourth
Edition,
ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March
2006.
See www.hardandsoftware.net for details and contact information.