C Board  

Go Back   C Board > General Programming Boards > Networking/Device Communication

Reply
 
LinkBack Thread Tools Display Modes
Old 01-10-2005, 01:27 PM   #1
Registered User
 
Join Date: Jan 2005
Posts: 30
Parallel Port! Detect incoming current, posible?

Hello!
I have little knowledge about parallel port programming on Linux. I wan't to know if its possible to like 'listen' if the current is incoming into data pin? What I need is forexample I have two wires, one from Data pin 1 and other from ground, if I put them together some function will return for example 1 else 0! Does anybody know something about this function!? I think its called inb(); Thanx!
hyaku_ is offline   Reply With Quote
Old 01-10-2005, 05:55 PM   #2
'AlHamdulillah
 
Join Date: Feb 2003
Posts: 790
what you are going to need to do is "poll" the pins. This can be done in multiple ways, but if you want the simplest, just go with a while loop that reads data from those pins, then calls/does something when you recieve certain results.
__________________
there used to be something here, but not anymore
EvBladeRunnervE is offline   Reply With Quote
Old 01-11-2005, 02:42 AM   #3
and the hat of Jobseeking
 
Salem's Avatar
 
Join Date: Aug 2001
Location: The edge of the known universe
Posts: 21,710
Worth a read
http://www.lvr.com/parport.htm
http://www.torque.net/linux-pp.html
__________________
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.

Salem is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Immediate programming help! Please! xMEGANx C++ Programming 6 02-20-2008 12:52 PM
brace-enclosed error jdc18 C++ Programming 53 05-03-2007 05:49 PM
Segmentation Fault - Trying to access parallel port tvsinesperanto C Programming 3 05-24-2006 03:28 AM
Problem with simple case statements shoobsie C Programming 2 05-08-2006 08:39 AM
linked list recursive function spaghetti ... C++ Programming 4 09-02-2003 02:53 PM


All times are GMT -6. The time now is 07:24 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22