2 Replies Latest reply on Oct 13, 2018 9:48 AM by preetibamane

    In adc lcd, potentiometer values fluctuating

    preetibamane

      I am doing handson on single ended adc. For that purpose i have used the code from psoc creator code examples which is for 16 bit resolution. But i want to do adc lcd for 8 bit resolution. I have done changes in adc - resolution bit is 8 bit, input range is 1.024 v , continue mode. In main () code, i have changed data type size from 16 bit to 8 bit. I used P6[5] port for pot. When i start to vary the pot, the values are fluctuating and after FF value by varying the pot continue it starts roll over . So my question is why this is happened? Is there any settings required to do?

        • 1. Re: In adc lcd, potentiometer values fluctuating
          ddka

          That shouldn't happen. Its quite strange. Can you please provide your PSoC Creator project? It will make debugging easier.

           

          Regards,

          Dheeraj

          • 2. Re: In adc lcd, potentiometer values fluctuating
            preetibamane

            Its similar with code example (ADC_single_ended). Only change is ADC Resolution of 8 bit.

             

            uint8 output;

             

                /* Start the components */

             

                LCD_Start();

                ADC_DelSig_1_Start();

             

                /* Start the ADC conversion */

                ADC_DelSig_1_StartConvert();

             

                /* Display the value of ADC output on LCD */

                LCD_Position(0u, 0u);

                LCD_PrintString("ADC_Output");

             

                for(;;)

                {

                    if(ADC_DelSig_1_IsEndConversion(ADC_DelSig_1_RETURN_STATUS))

                    {

                        output = ADC_DelSig_1_GetResult8();

            LCD_Position(1u, 0u);

                        LCD_PrintInt8(output);

                    }

                }