Wait for mux to settle for PCI-DAS 1002

Hi,

I'm working on an industrial project using RTAI-Lab with Comedi support 
to manage analog I/O of a ComputerBoards PCI-DAS 1002. I noticed that 
the driver (cb_pcidas) misses a waiting time for multiplexer to settle. 
This lack involves wrong readings with multiple consecutive 
comedi_data_read calls on different AI channels. You can test the 
outcome simply by adding other comedi_data_read to the "inp" demo under 
Comedilib.
The right behaviour is retrieved by adding a delay of 5 us after the 
writing to the ADC Channel MUX and Control Register.

--- cb_pcidas.c.orig    Tue Mar 11 12:40:52 2003
+++ cb_pcidas.c Tue Mar 11 12:41:07 2003
_at__at_ -815,6 +815,8 _at__at_
                 bits |= SE;
         outw(bits, devpriv->control_status + ADCMUX_CONT);

+       udelay(5);
+
         /* clear fifo */
         outw(0, devpriv->adc_fifo + ADCFIFOCLR);

I don't know if this modification affects other boards supported by the 
same driver. Anyone can test it?

Ciao, Lorenzo.

Received on 2003-03-11Z11:47:02