LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 07-25-2023, 09:42 AM   #1
Krupski
Member
 
Registered: Jan 2015
Location: The worst state in USA (can you guess?)
Distribution: Debian 11 (x86_64)
Posts: 44

Rep: Reputation: 0
Linux PC GPIO


Hi all,

I would like to know if there is any way to add GPIO functionality to a Linux PC (not a Raspberry PI). Imagine an old DOS machine where one could read and write bits to the parallel port. That's what I want to do, but with a modern PCIE card of some sort. 8 bits would be good enough, but I'll gladly take more

Also, I wonder if a PCIE parallel port card would do it. How would I access individual bits of the card. I'm sure I can't just peek and poke memory addresses using a modern protected mode OS (Debian 11, 64 bit).

I have been using an FTDI232RL in bitbang mode and it works, but it's slow and cumbersome to use (I have to build up a data stream with bits set or cleared, then send the bytes to the FTDI to turn individual bits on or off. Reading data lines is even more of a pain).

Any suggestions will be greatly appreciated!
 
Old 07-25-2023, 10:58 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 26,755

Rep: Reputation: 6318Reputation: 6318Reputation: 6318Reputation: 6318Reputation: 6318Reputation: 6318Reputation: 6318Reputation: 6318Reputation: 6318Reputation: 6318Reputation: 6318
There are lots of options including USB just depends on your requirements and budget. They typically have their own drivers etc. Here are just a few:
National Instruments
Advantech
MCCDAQ
adlink technology

Last edited by michaelk; 07-29-2023 at 02:03 PM.
 
Old 07-29-2023, 01:51 PM   #3
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 17,542

Rep: Reputation: 2608Reputation: 2608Reputation: 2608Reputation: 2608Reputation: 2608Reputation: 2608Reputation: 2608Reputation: 2608Reputation: 2608Reputation: 2608Reputation: 2608
Does it have to be a pc? They're about the worst thing to do gpio on.

If not, use something else. If you need a pc, check out accessories for Industrial PCs. You might get something that will plug into usb or take a slot.
 
Old 07-30-2023, 01:19 PM   #4
Arnulf
Member
 
Registered: Jan 2022
Location: Hanover, Germany
Distribution: Slackware
Posts: 312

Rep: Reputation: 112Reputation: 112
Python with pyparallel package may be a suitable solution for GPIO over parallel port.

https://pypi.org/project/pyparallel/
 
  


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
GPIO access on a Fujitsu Mini-ITX Industrial Mainboard, PCI Driver for GPIO mechatrix Linux - Embedded & Single-board computer 3 11-20-2011 03:57 PM
Using GPIO (from kernel GPIO support) in MY application DannyGilbert Linux - Kernel 2 03-16-2009 07:52 AM
Gpio Twiddling In Embedded Linux? or How to access PCI memory space regs? jds-linux Programming 1 07-11-2004 02:17 AM

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

All times are GMT -5. The time now is 01:13 PM.

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
Open Source Consulting | Domain Registration