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.

F28335 ADC Data Climbs with DC Input



Greetings,

 

                I am using the C2000 development kit, and have grounded the ADC 1 input with a 1K resistor.  I expect the data to be near 0 and fairly stable.  But what I see is an asymptotic rise which finally stabilizes at about 48mv.  My concern is the asymptotic rise.  It takes over 130 samples before it stabilizes.  I am sampling at the maximum rate.  The data follows:

 

1651 9 c000 1 800 1

0003 0004 0005 0006 0007 0008 0008 000A 0009 000A 000A 000B 000C 000D 000D 000D

000F 000E 000F 0010 0011 0011 0012 0012 0011 0012 0012 0013 0013 0013 0014 0014

0015 0016 0016 0016 0016 0017 0016 0017 0017 0017 0017 0018 0019 0018 0019 0019

0019 0019 0019 001A 001A 001A 001B 001B 001B 001B 001B 001B 001C 001C 001A 001C

001C 001D 001C 001C 001C 001C 001C 001C 001C 001D 001D 001C 001D 001D 001D 001D

001C 001D 001D 001D 001E 001D 001D 001E 001E 001F 001E 001E 001E 001F 001E 001F

001F 001E 001F 001F 001E 001F 001F 001E 001F 001F 0020 001F 001F 001F 001F 0020

001F 001F 0020 001F 001F 001F 001F 001F 001F 001F 001F 0020 0020 0020 0020 0020

0020 001F 001F 0020 0020 0021 0021 0020 0020 0020 0020 0021 0021 0020 0020 001F

0020 0020 0020 0020 0020 0020 0020 0020 0020 0020 0020 0020 001F 0021 0020 0020

0020 0021 0020 0020 0020 0020 0021 0020 0020 0021 0020 0021 0021 0020 0021 0020

 

                Is there something I can do to prevent the rise?  BTW, I don’t see this if I rail the input to the high side.  All the values are 0xFFF.

 

Thank you,

 

Ed

 

 

  • Hi Ed,

    What about your ACQPS value?

    Regards,
    Gautam
  • Hi Gautam,

     

                    Here is my initialization code and the setup before the burst.

     

    #define ADC_MODCLK   0x3

    #define ADC_ADCBGRFND 0x00C0

    #define ADC_ADCPWDN        0x0020

    #define ADCTRL3_INIT ADC_ADCBGRFND + ADC_ADCPWDN

    #define ADCMAXCONV_INIT    15              // 16 conversions

    #define ADCCHSELSEQ_SETUP  0x0000     // All are channel 0.

     

    void AdcHwInit()

    {

         // Let the system setup the ADC and wait for it to settle.

         InitAdc();

     

         // The following setup is to achieve the maximum conversion rate of 12.5 MSPS.

         // It is taken from spru812a (ADC document) page 26 (Table 1-7).

     

         // HISPC

         // The peripheral clock rate is SYSCLKOUT (HISPC + 1)

         EALLOW;

         SysCtrlRegs.HISPCP.all = ADC_MODCLK;

     

         // Assumes that the PIE Vector Table has already been setup.

         PieVectTable.ADCINT = &AdcInterrupt;

         EDIS;

     

     

         // ADCTRL1

         AdcRegs.ADCTRL1.bit.ACQ_PS = 0;            // S/H width in ADC module periods = 1 ADC clock to match the ADC's conversion rate

         AdcRegs.ADCTRL1.bit.SEQ_CASC = 1;          // A sequence is 16 conversions.

         AdcRegs.ADCTRL1.bit.CONT_RUN = 1;          // Keep the ADC running.

     

         // ADCTRL2

         AdcRegs.ADCTRL2.bit.EPWM_SOCB_SEQ = 1;          // Allow the SEQ to be started from the ePWM

         AdcRegs.ADCTRL2.bit.INT_ENA_SEQ1 = 1;

     

         // ADCTRL3

         AdcRegs.ADCTRL3.all = ADCTRL3_INIT;

     

         // ADCMAXCONV

         AdcRegs.ADCMAXCONV.all = ADCMAXCONV_INIT;

    }

     

    void AdcSetupCapture()

    {

         AdcRegs.ADCTRL2.bit.RST_SEQ1 = 1;         // Reset SEQ1

     

         // From spru812a.pdf (section 1.7)

         // If continuous conversions of the same channel are needed then all the

         // CONVxx registers should have the same channel address.

         AdcRegs.ADCCHSELSEQ1.all = ADCCHSELSEQ_SETUP;

         AdcRegs.ADCCHSELSEQ2.all = ADCCHSELSEQ_SETUP;

         AdcRegs.ADCCHSELSEQ3.all = ADCCHSELSEQ_SETUP;

         AdcRegs.ADCCHSELSEQ4.all = ADCCHSELSEQ_SETUP;

    }

     

    Thanks,

     

    Ed

  • Hi Ed, can you try another voltage?  I would recommend a resister divider from the 3.3V, an external power supply, or 1.5V battery.

    note: desktop supplies are rather noisy (high DC code spread) but should serve for the purpose or looking for the asymptotic rise.

    The full scale voltage is 3.0V for the ADC so tying to the 3.3V rail will certainly saturate the conversion results.

    I would like to see if this is something that occurs throughout the transfer function range (0-3V) or only when tied to ground.  I have seen on occasion a disturbance of the REFLO or AGND when an ADC channel is tied directly which can take some time to settle out.

    You might also note what filter cap is present for the ADC input pins.

  • Hi Joe,

     

    I attached a power supply, and it does not occur with that.  Instead I see the two sample phenomenon I read about on another post.  So I think that what I was seeing is the result of the fact that I was using a 1K resistor to the ADC input on the development kit.  This was good for looking at high voltages and protecting the ADC input from the 3.3V which the docking station supplies, but produced this phenomenon when connected to ground because the Control Card has a 100nf capacitor to ground (in addition to a 56 ohm inline resistor). The output shows the Sample and Hold being driven to 0 at the start of the ADC conversions and a slow drift up to a stable value, the time constant being a function of the parallel RC circuit to ground which was created at the input, and the input circuitry of the ADC.

     

    Thanks,

     

    Ed

    Hi Joe,

     

    I attached a power supply, and it does not occur with that.  Instead I see the two sample phenomenon I read about on another post.  So I think that what I was seeing is the result of the fact that I was using a 1K resistor to the ADC input on the development kit.  This was good for looking at high voltages and protecting the ADC input from the 3.3V which the docking station supplies, but produced this phenomenon when connected to ground because the Control Card has a 100nf capacitor to ground (in addition to a 56 ohm inline resistor). The output shows the Sample and Hold being driven to 0 at the start of the ADC conversions and a slow drift up to a stable value, the time constant being a function of the parallel RC circuit to ground which was created at the input, and the input circuitry of the ADC.

     

    Thanks,

     

    Ed