Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Return from polling par port

Status
Not open for further replies.

MerryMadDad

Programmer
Dec 11, 2001
47
GB
Hello all,

I need to get data input on the parallel port, but the event takes only max 300uS so I can't poll the pp every 10mS like I wanted to or even every 1mS so can anyone tell me how to exit from continually monitoring the pp to check for any other events ?

I would like to use the standard Ontimer event set to say 10mS to exit a loop that would be continually checking the pp

any help received with thanks
 
You could try monitoring the port with an OnIdle handler.
There will also be multithreaded solutions to this
I suppose.
I would be wary of using a Delphi Timer component running at 10mS.

I use a 3rd party handler (componenet) to get serial Port Data,it triggers an event when data arrives, there must be simualar components for the Parallel port.

Steve.
 
Hi sggaunt,

Thanks for your answer, what third party component do you use for the Serial port ? I got a problem here with OnIdle and any other method because if I monitor the pp continually I will use too much processor time, guess I could re-diredt the pp to the serial port and use the third party component you mentioned, anyone else any ideas ?
 
Hi Merry

I used to use a thing called TCommportdriver by Marco Cocco
up to V32.1.08
This one is quite easy to use but I dont know if you will still find it it's certainly not supported anymore.

Currently I use CportLib by Dejan Crnila, This is much more sophisticated its a suite of components designed for comm port access. There is a Driver component and a Packet handler (very usefull), plus some other bits and pieces.
Most importantly for you it is multithreaded so should appear fairly transparent to your program. You should be able to pick it up from most component sites.

Steve.





 
Hi Steve,

Thanks for the info
I still haven't quite got the hang of posting on forums etc - but I'm working on it :)

Regards

Robert
 
Thanks to Steve and Nico for pointing me in the right direction, I found a component that does exactly what I want to do - no fuss and you don't need a university degree to install the new component ! it is TVicLTP and has an OnInterrupt event for the PP, but it costs, if anyone knows of a similar free component I'd be glad to hear about it :)

Robert
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top