المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Parallel Port Polling



C# Programming
05-31-2009, 06:53 PM
Hello!

I'm stumped! I've been tring to code up a routine that monitors a parallel port pin for status change, then reads the data coming across it. My unique requirement is that I need to monitor the port more frequently than provided by the usual Sleep or Timer utilities (which have millisecond accuracy). I've developed a microsecond-level Timer to solve that problem, using QueryPerformanceCounter/Frequency. The real problem I have is that by polling the parallel port, the program locks up: "Program Not Responding". I've looked into Port Interrupts, but haven't found much that's intelligible.

What's an easy way to implement what I'm trying to accomplish? http://www.barakasoft.com/script/Forums/Images/smiley_sigh.gif

Glen