My project involves interfacing two analog-digital converters to an STM32F411RE microcontroller. The first ADC is an ADS1191, the second is an ADS1158.
Those two ADCs will have to convert signals simultaneously and their samples retreived by the MCU.
I've been used to work with a single ADC. The program is interrupted as the DRDY (data ready) pin goes low, and the samples are retrieved.
The questions are:
Do I need to make sure the two ADCs share the same master clock? If yes, I suppose I should use the internal clock of one of them, and feed it to the external clock pin of the second one. ADS1191 has an internal clock of 2MHz and requires an external clock of 2MHz. ADS1158 has an internal clock of 16MHz and requires an external clock of 0.1 to 16mHz. Is it safe to use ADS1191 internal clock and feed it to ADS1158? Will I have to sacrifice anything by feeding a master clock of lower frequency (2MHz vs 16MHz)?
The "continuous read" mode which I'm used to use with a single ADC consists in connecting an interrupt signal to the DRDY (data ready) pin of the ADC. When data are being sampled, the DRDY pin switches high. Then, when the data are ready to be transferred, the pin switches low. The MCU detects the falling edge of DRDY and starts transferring the data byte-per-byte.
What I'm looking for is to have "correlated" samples, i.e. make sure that two respective samples from each ADC retrieved at the same time indeed correspond to the same time "bin", which might not happen if the respective master clocks show a drift. From the valuable answers below, I conclude the following regarding the use of two (or more) ADCs.
Suggested solution Make sure the two ADCs share the same master clock. In my application I'm able to redirect the internal master clock of the first ADC to an output pin. This clock signal would then be fed to as "external clock" on the second ADC. To reduce the frequency (which most of the time is related to the sampling rate), one can resort to a d-type flip-flop (to divide freq. by two). The principle would therefore be the same as in a single ADC application: trigger interrupt on DRDY of one ADC (the one with shortest hold time). When this first transfer has finished, retrieve samples from the other ADC.