How to send high signal or low through a specific pin
If I wanted to control a small circuit, how would I send a +5 voltage signal to a specific pin, either it be a parallel port, com port, or maybe a specific pin on a ide (or floppy pin's) wire? My distro of choice would be debian.
|
Your best bet to control a 5V signal would be through a parallel port (a 'real' parallel port, not a USB dongled printer port). RS-232 doesn't use TTL level signaling, so only +/-12ish volts are possible there. IDE/floppy ports might work, but that would be somewhat non-traditional. Your terminology is a bit unclear (send a +5 voltage to a pin); are you trying to read or write a signal?
The distribution of Linux is irrelevant. What is relevant is the programming language in which you wish to implement your program. To access IO address space from a userspace application requires root privilege. You can use the ioperm() plus any of the inb()/outb() family of system calls, or you can use the /dev/port interface. The /dev/port interface should be available from most languages; the inb()/outb() interface is probably more limited. C will give you both. --- rod. |
All times are GMT -5. The time now is 08:47 PM. |