Home

Multiplexing inputs to a Delta Sigma ADC

E-mail Print PDF
( 1 Vote )
Question:  When I change the input to a Delta Sigma ADC, the result is corrupted.  What is the reason for this?  What are the various factors to be considered while multiplexing the input to a Delta Sigma ADC?

Answer: The Delta Sigma ADC is a pipe-lined ADC.  The output is valid only on the second ADC result.  If there is no change in the input signal, all the subsequent results are valid.



When the input to the Delta Sigma ADC is changed in the foreground, the switch can occur anywhere in the conversion process.  So, to avoid cross talk, the first two results after changing the input have to be dropped.  For example:

// Change input to ADC
AMUX4_1_InputSelect(AMUX4_1_PORT0_1);

// Inside the for loop, do three ADC conversions.  The first two results are automatically dropped and
// ADCResult will have the value of the third conversion which is correct.
for(i=0; i<3; i++)
{
while(DELSIG8_fIsDataAvailable() == 0);
ADCResult = DELSIG8_iGetDataClearFlag();
}

If the switching is done exactly at the end of conversion, then only one result need be dropped.  This can be done by changing the input to the ADC inside the ADC's ISR.  Inside the ADC's ISR, custom code area markers are available immediately after the ADC result is available.  User can add assembly code inside these markers to switch the input and to drop the first result after switching.  Below is the code snippet from the DELSIG11 ADC's ISR.  The code can be found inside DELSIG11_1INT.asm file.

.ConversionReady:

   ;@PSoC_UserCode_BODY@ (Do not change this line.)
   ;---------------------------------------------------
   ; Insert your custom code below this banner
   ;---------------------------------------------------
   ;  data is now in X, A
   ;  This interrupt service routine has already
   ;  preserved the values of the A and X CPU registers
   ;  and will restore them before returning control...


    IF (DELSIG11_POLL_ENABLE)
       mov [DELSIG11_iResult+LSB], A              ; Save result in iResult
       mov [DELSIG11_iResult+MSB], X
       mov [DELSIG11_bfStatus], DELSIG11_DATA_READY_BIT; Set valid data flag
    ENDIF

   ; Add Assembly code here to switch the input to the ADC

   ;---------------------------------------------------
   ; Insert your custom code above this banner
   ;---------------------------------------------------
   ;@PSoC_UserCode_END@ (Do not change this line.)



Dropping two samples every time the input is changed (or one sample in case the input is changed inside ISR), severely reduces the throughput of the Delta Sigma ADC.  So, for measuring multiple inputs, Incremental ADCs are preferable over Delta Sigma ADCs.

Refer the below KB article that explains how to multiplex the input of an incremental ADC.

Multiplexing Inputs to an Incremental ADC

Tags: PSoC1 ADC Analog
Comments (0)
Only registered users can write comments!