Click here to Skip to main content
15,905,004 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello

All I need is to read a synchronisation 25ms pulse on pin 12 of the parallel port. Can anyone point me to the direction of how to do access an individual pin input in c#?

thanks!
Posted

you can read this

Click

Click


Please vote and Accept Answer if it Helped.
 
Share this answer
 
Comments
Member 2339208 8-Nov-10 14:41pm    
Thanks, I googled those down as well. What I am not getting from these, and maybe I'm just slow on it - how ro I read from a specific pin? When I call PortAccessAPI.Input(adress) - what would be the address for pin 12?

Also - if I need to wait for a pulse, do I just loop on PortAccessAPI.Input(adress), or there is a smarter way to do this (i.e callback of some sort)?
Individual pins do not have addresses, but you can AND the input word with a binary pattern to determine the value of just one pin. As for monitoring and responding to a single pin value, rather than delaying the rest of your app (and the entire PC) by continuously polling the port, create a thread to handle this and notify your main app when the value changes.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900