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.

F28377s ADC sample Differential signal

Other Parts Discussed in Thread: CONTROLSUITE

Dear all:

          how can I sample Differential signal by F28377s ADC, is CMPSS is useful? have any examples?

  • Winni,

    The ability to sample a differential signal can be enabled by changing the settings on the ADC to adjust the input signal mode from single-ended to differential. You can find examples in controlSUITE under the F2837xS folder in any of the ADC related examples. Specifically, in the code segment seen below:

    //Write ADC configurations and power up the ADC for both ADC A and ADC B
    void ConfigureADC(void)
    {
    EALLOW;

    //write configurations
    AdcaRegs.ADCCTL2.bit.PRESCALE = 6; //set ADCCLK divider to /4
    AdcbRegs.ADCCTL2.bit.PRESCALE = 6; //set ADCCLK divider to /4
    AdcSetMode(ADC_ADCA, ADC_RESOLUTION_12BIT, ADC_SIGNALMODE_SINGLE);
    AdcSetMode(ADC_ADCB, ADC_RESOLUTION_12BIT, ADC_SIGNALMODE_SINGLE);

    //Set pulse positions to late
    AdcaRegs.ADCCTL1.bit.INTPULSEPOS = 1;
    AdcbRegs.ADCCTL1.bit.INTPULSEPOS = 1;

    //power up the ADCs
    AdcaRegs.ADCCTL1.bit.ADCPWDNZ = 1;
    AdcbRegs.ADCCTL1.bit.ADCPWDNZ = 1;

    //delay for 1ms to allow ADC time to power up
    DELAY_US(1000);

    EDIS;
    }

    You can change the argument in the AdcSetMode function call from ADC_SIGNALMODE_SINGLE to ADC_SIGNALMODE_DIFFERENTIAL. This will enable differential mode. This will link two adjacent ADC input pins together. For example, in differential mode, ADC-A0 and ADC-A1 are link together in differential mode where A0 is the positive input and A1 is the negative input. Additionally, you will need to make sure you complete the initialization routines for both pins. The initialization routine can also be found in controlSUITE in the ADC example folders that call the SetupADCSoftware() function. Please let us know if you have any questions.