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.

AM335x ADC question

Hi,

I have checked the operation of the ADC on AM335xSK. I am using the following samples.

  - C:\ti\AM335X_StarterWare_02_00_01_01\examples\evmskAM335x\adc

It seems that AIN terminal drive low voltage output.

So, I have questions.

Q1.  I think AIN terminal is Analog input pin, why is it outputs voltage?

Q2.  Can AIN pin configured to not drive the voltage?

 

Best regards,

Chi

  • Hi,

    Your understanding is correct i.e. AIN terminal is analog input pin where one can connect a analog signal and process its digital output using ADC.

    In the StarterWare example no external analog signal is connected to AIN terminal but the transistors connected to the AIN lines are pulled up/down and the corresponding voltage is measured. The transistors are required for touchscreen functionality. This was done since there was no dedicated analog signal connected to the AIN pins of the board.

    AIN pin can be configured to not drive the voltage by disabling the transistors. 

    Regards,

    Jeethan

  • Hi, Jeethan

    Thank you for your reply.

    I have been to disable the transistor(Touch_Screen_Enable = 0), but AIN pin has low-voltage drive.

       - AIN0 is 400mV

       - AIN1 is 200mV

    Of course I was removed the touch panel on AM335xSK.

     

    Do I have to also set other registers?

     

     

    Best Regards,

    Chi

  • Hi,

    Can you please check by disabling the values for XPPSW, XNNSW, YPPSW, YNNSW, XNPSW, YPNSW, WPNSW present in the STEPCONFIG register?

    Regards,

    Jeethan

  • Hi,  Jeethan

    I checked by disabling these registers that you have pointed out.

    Please check the following code.

    ~~~~

    /* ADC is configured */

    static void ADCConfigure(void)

    {    

    /* Enable the clock for touch screen */    

        TSCADCModuleClkConfig();

        TSCADCPinMuxSetUp();

        /* Configures ADC to 3Mhz */    

        TSCADCConfigureAFEClock(TSC_ADC_INSTANCE, 24000000, 3000000);

        /* Disable Transistor bias */  // <--- modified    

        TSCADCTSTransistorConfig(TSC_ADC_INSTANCE, TSCADC_TRANSISTOR_DISABLE);  

        TSCADCStepIDTagConfig(TSC_ADC_INSTANCE, 1);

        /* Disable Write Protection of Step Configuration regs*/

        TSCADCStepConfigProtectionDisable(TSC_ADC_INSTANCE);

        /* Configure step 1 for channel 1(AN0)*/

        StepConfigure(0, TSCADC_FIFO_0, TSCADC_POSITIVE_INP_CHANNEL1);

        /* Configure step 2 for channel 2(AN1)*/

        StepConfigure(1, TSCADC_FIFO_1, TSCADC_POSITIVE_INP_CHANNEL2);

        /* General purpose inputs */

        TSCADCTSModeConfig(TSC_ADC_INSTANCE, TSCADC_GENERAL_PURPOSE_MODE);

        /* Enable step 1 */

        TSCADCConfigureStepEnable(TSC_ADC_INSTANCE, 1, 1);

        /* Enable step 2 */

        TSCADCConfigureStepEnable(TSC_ADC_INSTANCE, 2, 1);

        /* Clear the status of all interrupts */

        CleanUpInterrupts();

        /* End of sequence interrupt is enable */

        TSCADCEventInterruptEnable(TSC_ADC_INSTANCE, TSCADC_END_OF_SEQUENCE_INT);

        /* Enable the TSC_ADC_SS module*/

        TSCADCModuleStateSet(TSC_ADC_INSTANCE, TSCADC_MODULE_ENABLE);

    }

     

    /* Configures the step */

    void StepConfigure(unsigned int stepSel, unsigned int fifo, unsigned int positiveInpChannel)

    {    

    /* Configure ADC to Single ended operation mode */

        TSCADCTSStepOperationModeControl(TSC_ADC_INSTANCE, TSCADC_SINGLE_ENDED_OPER_MODE, stepSel);

        /* Configure step to select Channel, refernce voltages */

        TSCADCTSStepConfig(TSC_ADC_INSTANCE, stepSel, TSCADC_NEGATIVE_REF_VSSA,                     positiveInpChannel, TSCADC_NEGATIVE_INP_CHANNEL1, TSCADC_POSITIVE_REF_VDDA);

        /* XPPSW Pin is off, Which pull up the AN0 line*/ // <--- modified

        TSCADCTSStepAnalogSupplyConfig(TSC_ADC_INSTANCE, TSCADC_XPPSW_PIN_OFF, TSCADC_XNPSW_PIN_OFF, TSCADC_YPPSW_PIN_OFF, stepSel);

        /* XNNSW Pin is off, Which pull down the AN1 line*/ // <--- modified

        TSCADCTSStepAnalogGroundConfig(TSC_ADC_INSTANCE, TSCADC_XNNSW_PIN_OFF, TSCADC_YPNSW_PIN_OFF, TSCADC_YNNSW_PIN_OFF,  TSCADC_WPNSW_PIN_OFF, stepSel);

        /* select fifo 0 or 1*/

        TSCADCTSStepFIFOSelConfig(TSC_ADC_INSTANCE, stepSel, fifo);

        /* Configure ADC to one short mode */

        TSCADCTSStepModeConfig(TSC_ADC_INSTANCE, stepSel, TSCADC_ONE_SHOT_SOFTWARE_ENABLED);

    }

    ~~~~

     

    However, Low voltage is observed.

       - AIN0 is 400mV

       - AIN1 is 200mV

     

    Best regards,

    Chi

  • Hi

    The AN0 to AN4 lines are used for four and five wire touch screens. So some voltage may be observed on those lines based on the Vref voltage supplied to the AFE.

    Could you try the same using say AN7 or AN8 lines for your application.

    Regards
    Anant Pai

  • Hi, Anant

    Thank you for your reply.

     

    However, I am a little confused by your answer.

    Do we would not be able to use the AN0 to AN4 as genaral ADC input because of this lines are supplied Vref voltage ?

     

    I'll try to make sure about that whether driving low voltage at AN7 and AN8.

     

    Best regards,

    H.U

  • Hi, Anant

    I change the questions above.

    If AN0 to AN4 have connected as AD converters,
    Does some voltage that observed on those line affect the input result of the ADC?

    Best regards,
    H.U

  • H.U

    Can you provide a register dump when this is happening?

    Thanks,

    Tyler

  • Hi, Tyler

    I am sorry for the delay in my response.
    I  lists the ADC_TSC registers information of the phenomenon during reproduction below.

    Best regards,
    H.U