4 Replies Latest reply on Oct 1, 2019 8:38 PM by shge_4395051

    CY8CKIT-147 PSoC® 4100PS Prototyping Kit

    shge_4395051

      Hello

       

      The device datasheet of the  CY8CKIT-147 PSoC 4100PS Prototyping Kit states that the operating range of the ADC is 0 to 5.5V.  I'm trying to configure the ADC as a single ended with 5V reference.  I cannot seem to do this.  Does this peripheral have this ability?  If not, can you refer me to a product line with a dev kit that can handle a 0 to 5V ADC input range? 

      thanks

      Shawn

       

       

       

        • 1. Re: CY8CKIT-147 PSoC® 4100PS Prototyping Kit
          VasanthR_91

          Hello Shawn,

           

          Could you please let us know what exactly is the observation at your end ? Is the device malfunctioning ? Or are you getting wrong results ?

           

          Best Regards,
          Vasanth

          • 2. Re: CY8CKIT-147 PSoC® 4100PS Prototyping Kit
            shge_4395051

            Hi Vasanth

            I just want to know how to configure the ADC to read input voltages from 0V to 5V.

            Best regards,

            Shawn

            • 3. Re: CY8CKIT-147 PSoC® 4100PS Prototyping Kit
              MoTa_728816

              Hi,

               

              I tried it this morning.

               

              I created a project with following schematic and connected a pot externally.

              001-schematic.JPG

               

              ADC Configuration

              004-ADC_Config.JPG

               

              The pot's vdd is connected to the VDD of CY8CKIT-147 and vss is connected to the GND of CY8CKIT-147.

              IMG_3996.JPG

               

              IMG_3997.JPG

              Then I changed the position of the POT from min to max

              and read the value from ADC.

              ===================

              Tester Display

              5.014   2047

              4.975   2047

              4.012   1649

              3.001   1241

              2.074   868

              1.032   437

              0.506   213

              0.000   0

              ===================

               

              So it seems that we can measure from 0V to 5V, although the configuration of ADC states 3.3V.

               

              Then I modified my main.c as below

              ===================

              #include "project.h"

              #include "stdio.h"

               

              #define VDDA    5.0

              #define ADC_MAX 0x7FF

               

              char str[128] ; /* print buffer */

              void print(char *str)

              {

                  UART_UartPutString(str) ;

              }

               

              void init_hardware(void)

              {

                  CyGlobalIntEnable; /* Enable global interrupts. */

                  UART_Start() ;

                  ADC_Start() ;

              }

               

              void splash(void)

              {

                  print("ADC Test CY8CKIT-147 ") ;

                  sprintf(str, "(%s %s)\n", __DATE__, __TIME__) ;

                  print(str) ;

              }

               

              int16_t measure(void)

              {

                  int16_t value ;

                  ADC_StartConvert() ;

                  ADC_IsEndConversion(ADC_WAIT_FOR_RESULT) ;

                  value = ADC_GetResult16(0) ;

                  return(value) ;

              }

               

              int main(void)

              {

                  int16_t ivalue = 0 ;

               

                  init_hardware() ;

               

                  splash() ;

               

                  for(;;)

                  {

                      ivalue = measure() ;

                      sprintf(str, "%d: %d.%03dV\n",

                          ivalue,

                          (int)(VDDA * ivalue / ADC_MAX),

                          (int)(1000 * VDDA * ivalue / ADC_MAX) % 1000

                      ) ;

                      print(str) ;

                   

                      CyDelay(1000) ;

                  }

              }

               

              /* [] END OF FILE */

              ===================

               

              The UART output to TeraTerm was

              003-TeraTerm.JPG

               

              moto

              • 4. Re: CY8CKIT-147 PSoC® 4100PS Prototyping Kit
                shge_4395051

                Thank you.  This answered my question.

                 

                Shawn Gerber