LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
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?

Notices


Reply
  Search this Thread
Old 03-30-2010, 02:01 AM   #1
SuperDude123
Member
 
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, 10:53 AM   #2
theNbomr
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 12:40 PM.
 
  


Reply


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 11:12 AM
CPU 12-V power supply: 4-pin or 8-pin? michapma Linux - Hardware 3 07-23-2007 11:13 AM
Problem connecting to AP when signal strength is low bulldozer Linux - Wireless Networking 3 01-21-2007 11:52 AM
Signal Strength Meter shows low signal? falcon56215 Linux - Networking 0 09-15-2006 08: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 04:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 03:47 AM.

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