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.