Hi, I want to alternate between two channels as fast as possible. I tried the following approach in continous conversion mode with a gain of 32:
Set Mux to channel 1
Do x coversions
Read conversion
Set Mux to channel 2
Do x coversions
Read conversion
Repeat
and
Stop Conversions
Set Mux to channel 1
Start Conversions
Do x coversions
Read conversion
Stop Conversions
Set Mux to channel 2
Start conversions
Do x coversions
Read conversion
Repeat
channel1: P: AIN2 N: VCOM
channel2: P: AIN3 N: VCOM
All input signals are given by voltage dividers which are connected to AVDD and AVSS. Therfore each input is close to (AVDD - AVSS)/2. REFP = AVDD, REFN = AVSS. Data is read whenever the nDRDY signal gets low. I tried different Samplerates and a different number of coversions after I switched the mux. There is always the following result:
One of the channels provides a plausible conversion result much faster than the other channel. Lets say I switch the mux and do 10 conversions. Channel 1 delivers a plausible result. I switch to channel 2 and do 10 conversions, the result is 2/3 of what i would expect. If I do 20 conversions after the switching, both channels deliver a plausible result.
If I start my measurement sequence with a different channel, the behaviour swaps. Therefore it is not a problem with the external circuit. All timings and transfered data is the same for both channels. I also analyzed the communication on the SPI Bus level using a logic analyzer to be sure there is no problem.
Is there anyone who can explain the behaviour or who can tell me if the used approach is wrong.