Parallel Port: Settings PINs on?
Hello!
Is it possible to select (in userspace) which pins should be enabled or do I have to write a kernel driver for that?
I want to switch a light on/off through my parallel port (attached to a optocoupler, which is attached to an ATX power supply), so I can control the heat in my drying chamber for the eggs of my bearded dragon.
Greetings,
Nico
Signature · 3 lines
Keep it simple & stupid, use what's available. Please use pgp encryption: 8D0E 27A4 is my id. http://nico.schotteli.us | http://linux.schottelius.org
Hi Nico :)
* Nico Schottelius <[email protected]> dixit:
Quoted 3 lines
Is it possible to select (in userspace) which pins should be enabled or do I have to write a kernel driver for that?
Userspace will do. Take a look at programs like 'parapin', 'k74',
'libieee1284', 'libparportled', or similars. Look in FreshMeat. As far as I know, all them runs in userspace, although you can find some Linux drivers for performing pin control of parallel port.
Raúl Núñez de Arenas Coronado
Signature · 3 lines
Linux Registered User 88736 | http://www.dervishd.net http://www.pleyades.net & http://www.gotesdelluna.net It's my PC and I'll cry if I want to...
Quoted 9 lines · DervishD
* Nico Schottelius <[email protected]> dixit:
Quoted 3 lines
Is it possible to select (in userspace) which pins should be enabled or do I have to write a kernel driver for that?
Userspace will do. Take a look at programs like 'parapin', 'k74',
'libieee1284', 'libparportled', or similars. Look in FreshMeat. As far as I know, all them runs in userspace, although you can find some Linux drivers for performing pin control of parallel port.
Just for the records: some programs that access the parport use non-portable inb/outb at PCish I/O addresses to control the parport line. Though, I haven't checked the programs mentioned above.
MfG, JBG
Signature · 4 lines
Jan-Benedict Glaw [email protected] . +49-172-7608481 _ O _ "Eine Freie Meinung in einem Freien Kopf | Gegen Zensur | Gegen Krieg _ _ O fuer einen Freien Staat voll Freier Bürger" | im Internet! | im Irak! O O O ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));
Quoted 3 lines · Nico Schottelius
Is it possible to select (in userspace) which pins should be enabled or do I have to write a kernel driver for that?
There's already a driver available for exactly this purpose: ppdev.
At http://lug-owl.de/~jbglaw/software/steckdose/steckdose.c is a program I wrote for controlling a shift register (serial in, parallel out) with relays attached (to switch on/off computers or to reset them). This should help you for a start. (Basically, open/claim the port and set the bits of the DATA port via an ioctl())
MfG, JBG
Signature · 4 lines
Jan-Benedict Glaw [email protected] . +49-172-7608481 _ O _ "Eine Freie Meinung in einem Freien Kopf | Gegen Zensur | Gegen Krieg _ _ O fuer einen Freien Staat voll Freier Bürger" | im Internet! | im Irak! O O O ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));