On Wednesday, April 21, 2010 11:20 PM, arjun rath wrote:
> Hi Everybody,
> 
> I am using a SPI based 12 bit adc(max1241) from maxim.I am trying to read
> the value from adc  using spi_read() in linux kernel.But every time i used
> to read i am getting *0xff* only.(i have to read two consecutive bytes).To
> the adc chip i am probing with CRO which always shows DOUT pin of ADC as
> high provided the input to ADC is always 1.1 volt.
> And the clock is also coming as seen in the CRO with Chip select line going
> low.
> 
> Is it a delay problem since for adc's we have to wait for sometime for
> conversion of data....????
> 
> Can anybody give some suggestion regarding this....

According to the datasheet, to start a conversion with the max124[0|1] you
need to pull the chip select low.  At the falling edge the T/H enters its
Hold mode and a conversion is initiated.  During this time the ADC will keep
the DOUT pin pulled low and the SCLK must be kept low during the conversion.
The end of conversion is signaled by DOUT going high.  At this point the
data can be shifted out with the SCLK signal.

It appears the SPI API is supposed to support this with the SPI_READY mode
flag.  But, the only SPI master driver in mainline that supports this flag
is the davinci_spi driver.

Regards,
Hartley
------------------------------------------------------------------------------
_______________________________________________
spi-devel-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/spi-devel-general

Reply via email to