Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Hardware
User Name
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?


  Search this Thread
Old 03-30-2010, 01:01 AM   #1
Registered: Nov 2008
Posts: 158

Rep: Reputation: 30
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.
Old 03-30-2010, 09:53 AM   #2
LQ 5k Club
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,397
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
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.

Last edited by theNbomr; 03-31-2010 at 11:40 AM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
B43 Broadcom 4311 Low Signal Strength snoopy1 Linux - Wireless Networking 1 12-17-2007 10:12 AM
CPU 12-V power supply: 4-pin or 8-pin? michapma Linux - Hardware 3 07-23-2007 10:13 AM
Problem connecting to AP when signal strength is low bulldozer Linux - Wireless Networking 3 01-21-2007 10:52 AM
Signal Strength Meter shows low signal? falcon56215 Linux - Networking 0 09-15-2006 07:39 AM
Need help to read a signal from the CTS pin of a serial port juan_de_margo Linux - Hardware 0 02-24-2005 03:36 AM > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 12:25 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration