parport problem

Hello,

I'm a comedi newbye. I'm trying to use a parallel port to manage digital 
I/O.
The system is a debian sarge (kernel 2.4.27) with library downloaded as 
debian package and modules compiled from sources.
The modules are installed. successfully.
The output of cat /proc/comedi is:
comedi version 0.7.70
format string: "%2d: %-20s %-20s %4d",i,driver_name,board_name,n_subdevices
 0: comedi_parport       parport                 4
comedi_parport:
 comedi_parport

The modules are autoloaded from modules.conf by the following lines

alias char-major-98 comedi
alias char-major-98-0 comedi_parport
post-install comedi_parport /usr/sbin/comedi_config /dev/comedi0 
comedi_parport 0x378,7

I wrote a simple class to manage I/O using subdevice 0
It seems ok but the value read after setting a bit are different from I 
expect.
Nothing is connected to parallel port.
Setting a single bit seems to modify a bunch of bits.

Here is the output sequence
setting bit 7 to 0
11111111
setting bit 6 to 0
11111111
setting bit 5 to 0
00001111
setting bit 4 to 0
00001111
setting bit 3 to 0
01100011
setting bit 2 to 0
11000110
setting bit 1 to 0
01011000
setting bit 0 to 0
01100100
Overall info
    Version Code : 1862
    Driver name  : comedi_parport
    Board name   : parport
    Subdevices   : 4
  Subdevice 0
      channels   : 8
      flags      : 30000
      type       : Digital input/output


The same program using subdevice 2 the output setting seems ok.
Is there something wrong in reading the bit values from a I/O subdevice 
set as output channel?

Which is the right right parallel port configuration from BIOS (EPP, 
SPP, ...)?
Any help will be appreciated.

Franco



-- 
------------------------------------------------------------------------
Franco Minutiello - DARTS Engineering srl
Tel: +39-010-5761240 Fax: +39-010-5760224
s-mail: Via T. Invrea 14 /2 16129 GENOA (ITALY)
e-mail: franco.minutiello_at_darts.it <mailto:franco.minutiello_at_darts.it>

Received on 2005-07-15Z10:15:03