- From: SA <n0td1scl0s3d_at_ntlworld.com>
- Date: Thu, 18 Aug 2005 19:30:27 +0100
On Wednesday 17 Aug 2005 11:43, you wrote:
> On 15/08/2005 15:10, SA wrote:
> > Dear List,
> >
> > On my pci-das4020/12 card I have a puzzling problem, the board has a 8255
> > on it for DIOs. I can successfully write to all channels (0-23, ports
> > a,b,c), however, I cannot read from ports B and C (channels 8-23).
>
> Strange. Are you using comedi_dio_config() correctly? Does the board
> work okay with Measurement Computing's software?
I think I am using comedi_dio_config() correctly:
for(channel=0;channel<20;channel++){
ret=comedi_dio_config(device,subdevice,channel,COMEDI_INPUT);
if(ret==-1){
comedi_perror("The error is");
printf("%d\n",comedi_errno());
}
}
Note that comedi_dio_config() doesn't return the correct error numbers for
some errors...
I haven't tested the card with MC's driver as I don't have the driver or
windows to test it. Are you thinking it might be a defective card? For my
purposes I can still use it (by swapping the ports around).
My big problem at the moment is that I can't go faster than 200kHz - I have
tried following the path the code takes from the library to the driver but
can't see what causes the speed to max out at 200kHz - surely the bus, card
and 8255 can go faster than this?
Cheers,
SA
> Note that the 8255 driver configures all the channels as inputs
> initially, so if nothing has ever configured them as outputs since the
> comedi device was configured, they should remain configured as inputs.
>
> > The channels in ports B+C all return 1 regardless of input, does anyone
> > have any suggestions? because I am quite stuck now.
>
> You have some of the
>
> > I presume that when you set the direction for one channel in a port then
> > all the other channels in that port also have their direction set- is
> > this correct?
>
> Yes, the channels are grouped 0-7, 8-15, 16-19 and 20-23. Configuring
> any channel in a group affects all channels in that group.
Received on 2005-08-18Z17:30:27