This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/TMS320F28379D: ADC Single Ended vs Differential Operation

Part Number: TMS320F28379D

Tool/software: Code Composer Studio

Using the ADC component on the experimenters board I find that in Single ended mode the ADC-A has an input range of 0 to 3V. I configured the ADC-D to measure a signal in Differential mode and after a lot of head scratching found that the input voltage range is now +/-3V. So it appears that in Single ended mode the ADC is Uni-Polar and in Differential mode it is Bi-Polar? I can find nothing in any literature that describes this, but my device is working that way.

1. So is this correct?

2. Is there a way to configure the ADC, when using differential inputs as Uni-Polar?

BTW: The ADC works REALLY well!

John

  • Hi John,

    I think the signaling mode section of the datasheet should be pretty helpful:
    www.ti.com/.../signal-mode-t4738267-67

    Both modes have an electrical input range of 0 to VREFHI and you should not apply a voltage < VSSA to the ADC pins, even in differential mode.
  • Thanks Devin,

    But...

    Here is the brief setup information

    AdcSetMode(ADC_ADCD, ADC_RESOLUTION_16BIT, ADC_SIGNALMODE_DIFFERENTIAL);

    const int nSampleWindow = 511; //Sample and Hold time (this is the maximum)
    const int nTriggerSel = 7; //Trigger on ePWM2 SOCA

    //Measure the Left Extensometer
    AdcdRegs.ADCSOC0CTL.bit.CHSEL = 0; //SOC0 will convert left extensometer
    AdcdRegs.ADCSOC0CTL.bit.ACQPS = nSampleWindow;
    AdcdRegs.ADCSOC0CTL.bit.TRIGSEL = nTriggerSel;

    //Measure the Right Extensometer
    AdcdRegs.ADCSOC1CTL.bit.CHSEL = 2; //SOC1 will convert right extensometer;
    AdcdRegs.ADCSOC1CTL.bit.ACQPS = nSampleWindow;
    AdcdRegs.ADCSOC1CTL.bit.TRIGSEL = nTriggerSel;

    Interrupts, readings etc work fine. If I short pin ADCD-2 to ADCD-3 (pins 34 to 36 on experimenters board) I get a reading of 32777 decimal in ADCRESULT1. With 1.675V on channel 0/1 of ADCD I get 51066 in ADCRESULT0. So that channel is offset by the 32767 as if it is bipolar also. If I apply -1.5V the counts go below the 32767 and works just fine.

    So I here what you are saying, but I have a lot of measurement experience and this thing sure acts like it is in BiPolar mode with a +/- 3V range??? I don't know any other way to explain it. I setup the software to use a signed int and subtract off the 0x7fff offset and then use a factor of 3.0 / 32767.0 or 6.0 / 65535.0 if you prefer. The readings are dead on positive or negative?

    John
  • Hi John,

    You can get the formulas to convert the voltage difference on the pin to a digital code (or vice versa) in the TRM (

    http://www.ti.com/lit/ug/spruhm8g/spruhm8g.pdf

    ) in section "10.1.3.5 Expected Conversion Results"

    Before you use the formula, you need to meet the following electrical requirements that are in the datasheet:

    • Vin+ and Vin- are between VSSA and VDDA
    • Common mode of Vin+ and Vin- is +/-50mV from VREFHI/2.  

    Certainly it will produce some output if you don't meet these requirements, but the formula to determine the output is undefined, performance will not be good, and you could damage the device if you apply < -0.3V to the pins. 

  • Hi Devin,

    Yes I understand the specifications given, what I did not tell you is that the minus voltage applied was in respect to ADCINyP and ADCINyN, not VREFLOW or VREFHI. Per the specifications given in Table 10-3, the ADC and my understanding agree. I do believe that there is a typo in the differential specification. It states VREFHI < ADCINyP - ADCINyN <= -VREFHI as the normal operating values, it should be <= VREFHI, not <= -VREFHI.

    Per the other definitions in Table 10-3,

    ADCINyP - ADCINyN < -VREFHI, result == 0, and ADCINyP - ADCINyN >= VREFHI, result == 65535 so the delta between ADCINyP and ADCINyN can be between -VREFHI and +VREFHI. Of in the case of VREFHI ==3V, the delta between the inputs can be from -3V to +3V.

    So, we have gone off on a tangent here. Back to my original question.

    Since we both agree that the ADC is operating in Bi-Polar mode when in Differential configuration, is there a way to configure the ADC to run in Uni-Polar, when configured for Differential inputs? Our signal will always positive in respect to ADCINyP - ADCINyN, ADCRESULT from 32768 to 65535, so we lose a bit.

    Thanks John
  • Hi John,

    For example, if VREFHI = 3V and the input is near the bottom of the range: Vin+ = 0.15V and Vin- = 2.85V

    Then (Vin+ - Vin-) = (0.15 - 2.85) = -2.7V

    If the input is now near max, say: Vin+ = 2.9V and Vin- = 0.1V

    Then (Vin+ - Vin-) = (2.9 - 0.1) = 2.8V

    Both are within
    -VREFHI < ADCINyP - ADCINyN ≤ VREFHI

    (I'll submit for that extra '-' to be removed from the docs, thanks)

    In both example cases the inputs
    *Are positive voltages
    *Common mode is exactly VREFHI/2

    This video may also be helpful:
    training.ti.com/ti-precision-labs-adcs-sar-adc-input-types

    The C2000 device has 'Fully differential' inputs (not pseudo-differential or truly differential)
  • Hi Devin,

    Agreed. But the readings are still based around 32768 mid scale for zero volts DIFFERENCE between the two. Thats great if it's some sort of bridge that is excited by VREFHI to VREFLO, I get that. Our signal will close to ground for it's low and VREFHI for the high end, so it would be nice to operate in Uni-Polar mode. I am assuming not.
    Thanks,
    John
  • Hi John,

    The other way to think about the input is that Vin+ is exactly the same as a normal single-ended ADC: When Vin+ is 0, digital output is 0. When Vin+ is VREFHI, digital output is max digital value. Vin- is then the complement of this signal about the common mode voltage (1.5V if VREFHI = 3.0V)
  • Hi Devin,

    I do not mean to contradict, but it is the difference between Vin+ and Vin- that matters.

    consider this table below

    Vin+ Vin- Vin+ - Vin- ADCRESULT
    0 0 0 0x7FFF
    2 2 0 0x7FFF
    3 0 3 0xFFFF
    0 3 -3 0x0000

    Yes, I agree they are "Fully Differential" inputs. The ADC is running BiPolar mode with respect to the difference between Vin+ and Vin-, I would really like to run it Uni-polar to pickup that extra bit!

    Thanks,
    John
  • Hi John,

    Your first two rows are invalid inputs, so it doesn't really matter what the output is. Vcm for the first is 0 (needs to be VREFHI/2 +/- 50mV) and for the second Vcm is 2V (needs to be VREFHI/2 +/- 50mV).

    This common mode requirement is because the inputs are 'fully differential' and not 'truly differential'. If they were 'truly differential' then you could use any common-mode input voltage and the output would really just be the difference between the inputs.