in reply to Re: Need to detect continuity between 2 terminals
in thread Need to detect continuity between 2 terminals
Those are data communication ports and not general input/output pins
I beg to differ. From the perspective of the code, a parallel port is just a set of 3 registers -- 1x8-bit (data), 1x5-bit(status), 1x4bit(control) -- that can be read and written using the appropriate (INx/OUTx) instructions.
On modern OSs these are privileged instructions, so you do need a device driver that exposes them to application code, but given that access, when the data port is read, any of the data pins (2-9 on a db25 plug) held high will be 1; with those held low as 0.
With an appropriate device driver, this is easily programmed under windows (I've done it). And I read on wikipedia that "On Linux, inb() and outb() can be used when a process is run as root and an ioperm() command is used to allow access to its base address; alternatively, ppdev allows shared access and can be used from userspace if the appropriate permissions are set.".
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Need to detect continuity between 2 terminals
by martell (Hermit) on Jan 07, 2013 at 20:36 UTC |