linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Embedded system control loops and reading from daisy-chained ADCs
@ 2011-01-12 16:45 Nicholas Kinar
       [not found] ` <4D2DDA9E.4090504-/KKvz3x1pcI@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Nicholas Kinar @ 2011-01-12 16:45 UTC (permalink / raw)
  To: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

Hello,

I am in the process of designing an embedded system that needs to read 
values over SPI from 5 daisy-chained ADCs.  The ADCs are the AD7685 from 
Analog Devices 
(http://www.analog.com/en/analog-to-digital-converters/ad-converters/ad7685/products/product.html).  
These are 16-bit ADC slave devices that are read over a SPI bus.  I 
would like to read these devices at a rate of 1 kHz.  I am using the ARM 
AT91SAM9RL processor.  This processor will run the Linux kernel.

To read values from these ADCs, the processor must first toggle a port 
pin (CNV) to initiate a conversion.  The processor needs to toggle the 
port pin at a rate of 1 kHz, perhaps using a high-resolution timer.  
After every conversion, the processor needs to lower a chip select pin 
and read data consisting of a (16 bit)(5) =  80-bit word.  The chip 
select pin then goes high.  I assume that the daisy-chained ADCs would 
appear to the kernel driver as a single SPI slave with MISO, MOSI, and 
\CS pins.  The only difference is the CNV pin that is needed to initiate 
a conversion.

After every conversion, the kernel driver needs to make a comparison (is 
the value from each ADC above or below a certain value).  The kernel 
driver needs to then select an SPI slave DAC (AD5621) or I2C slave DAC 
(AD5622) and update the voltage output of the DAC.

I need to read data from the ADC slaves at a rate of 1 kHz.  What is the 
best way to do this without introducing too much jitter, and is it 
possible to do this all with one kernel driver?

Nicholas


------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-01-14  5:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-12 16:45 Embedded system control loops and reading from daisy-chained ADCs Nicholas Kinar
     [not found] ` <4D2DDA9E.4090504-/KKvz3x1pcI@public.gmane.org>
2011-01-13  2:33   ` Ned Forrester
     [not found]     ` <4D2E646E.40505-/d+BM93fTQY@public.gmane.org>
2011-01-13 16:00       ` Nicholas Kinar
     [not found]         ` <4D2F219A.1090601-/KKvz3x1pcI@public.gmane.org>
2011-01-14  4:43           ` Ned Forrester
     [not found]             ` <4D2FD480.4020001-/d+BM93fTQY@public.gmane.org>
2011-01-14  5:01               ` Nicholas Kinar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).