Bit by bit parallel port control

From: Tony Howat
Date: Mon Oct 11 2004 - 09:16:26 EST


Hi Everyone,

I'm having problems controlling the parallel port on a bit-on bit-off basis
for a relay switch on a control project.

Linux marmot 2.6.5-1.358 #1 Sat May 8 09:04:50 EDT 2004 i686 athlon i386
GNU/Linux

I have tried using the /dev/port method and putb - I can seemingly set bits
on the port OK. However, checking with a meter shows the line changing for a
few milliseconds then returning to 0v. I need the levels to hold. I believe
that's what SHOULD happen...

I figured the lp module may interfere, so removed that. No help. Currently
lsmod shows:

w83781d 26240 0
i2c_sensor 2176 1 w83781d
i2c_amd756 4484 0
i2c_core 16388 3 w83781d,i2c_sensor,i2c_amd756
autofs4 10624 0
sunrpc 101064 1
forcedeth 10624 0
floppy 47440 0
sg 27552 0
scsi_mod 91344 1 sg
dm_mod 33184 0
ati_remote 9228 0
ohci_hcd 14748 0
button 4504 0
battery 6924 0
asus_acpi 8472 0
ac 3340 0
ext3 102376 3
jbd 40216 1 ext3

Board is an ASUS A72N266VM (nforce based). Build is fedora 2. I'm not
running lpd or X etc. Any suggestions?

There's plenty of sample code around, so I'm pretty confident I'm doing
things right. My test code is here :

http://www.i-r-genius.com/paralleltest.c

I suspect there's something odd going on. I aim to try the code on an older
machine soon.

Any help or pointers appreciated,

--
Tony

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/