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.

ADC External Reference Issue TMS320F28035

Other Parts Discussed in Thread: TL431

Hi all,


I am trying to use an external voltage reference in conjunction with the VREFHI and VREFLO pins to scale the ADC input on an F28035 microcontroller to 2.5V.  I am using a TL431 shunt regulator as the voltage reference and I am using the following configuration procedure for the ADC.

    EALLOW;
    AdcRegs.ADCCTL1.bit.ADCREFSEL    = 1;    // Used to select external reference
       AdcRegs.ADCCTL1.bit.ADCBGPWD    = 1;    // Power up band gap
       AdcRegs.ADCCTL1.bit.ADCREFPWD    = 1;    // Power up reference
       AdcRegs.ADCCTL1.bit.ADCPWDN     = 1;    // Power up rest of ADC
    AdcRegs.ADCCTL1.bit.ADCENABLE    = 1;    // Enable ADC

    DSP28x_usDelay(1000);         // Delay before converting ADC channels


This is followed by additional settings like the ACQPS, channel select settings, etc. 

I expect since I set the ADCREFSEL register to 1 that the microcontroller should be using the external 2.5V ratiometric reference.  However what I see is that the scale for the ADCRESULT register is scaled to the internal reference.  Is there some sort of register I am setting incorrectly?  Based on the ADC documentation for the microcontroller I can't find any errors or issues with my start up procedure.  Any advice or guidance would be appreciated.  Thanks!

  • Hi Lance,

    This thread might help you out: e2e.ti.com/.../437652

    Regards,
    Gautam
  • Hi Lance,
    I'd start by setting a breakpoint in the above code and making sure the registers are getting set correctly, for example if EALLOW is not set, some registers are not writable. Also make sure you are not running any function after the above setup which might be switching back to internal reference mode (for example offset calibration).
    Regards,
    Joe
  • When I check the register the ADCREFSEL bit is 1 and stays that way, nothing kicks it back to 0. I'm still a little confused; the link suggested summarized that for the 2833x the full scale is always 3.0V, but the data sheet for the 28035 states that it should be possible to get a ratiometric result related to 4096*[(Input - VREFLO)/ (VREFHI-VREFLO)] which in this case should workout to be 4096 * Input / 2.5V.
  • Hi Lance,

    That link is not relevant to you.  F28335 and F28035 have different ADC architectures.  F28335 does have fixed Vfs but F28035 is ratiometric in EXTREF mode.

    Sorry to ask such basic questions but like you I'm puzzled by the behavior you're seeing:

    Can you post some specific input voltage/ADC conversion examples of how the ADC is scaling to the internal ref?  I just want to make sure it can't be explained by other sources of error or errata conditions. 

    What channel are you converting?  Have you tried other channels?

    I presume you've measured the voltage at the ADC input (not just trusting your source).  What is the voltage source (i.e. bench supply, battery ,voltage divider, buffered output, etc.)?

    I presume you've measured the voltage at the reference pin and confirmed 2.5V.

    What is VREFLO tied to?

    Regards,

    Joe