7 Replies Latest reply on Jun 26, 2017 6:26 AM by rola_264706

    ADC_SAR config


      Hi,
      I'm new in developing embedded systems and just trying to built my own voltmeter based on PSoC 5LP using PSoC Creator 4.0/4.1. When I try to configure the ADC_SAR I cannot set the Vref value. I have learned  from the datasheet that this is normal because when using internal reference the Vref is read only (fixed 2.500volts).
      Although I would like to have the input range from Vss (0V)  up to Vdda witch is set to 3,3volts. So the Vref should be set to 1.6500 volts. I have no external reference voltage so have to use the internal. Please help how to perform the measurement between 0-3,3V.
      Many thanks!

         

      Gabor
       

        • 1. Re: ADC_SAR config

          Use 'internal Vref bypassed' as reference. This set the reference voltage to 2.048V. Then set the input range to 2*Vref, so you get a input range of 0-4.096V. This gives a nice resolution of 1mV per bit.

             

          You cannot chgange the internal reference voltage to a different voltage, its fixed.

          • 2. Re: ADC_SAR config
            rola_264706

            Here are some design point for signals.

               

            1 of 1 people found this helpful
            • 3. Re: ADC_SAR config

              thanks a lot! But using internal bypassed does not influence Vref directly (stays untouched). Plus I have only the options (0.0 to 2.048V as 0 to Vref*2) (Vssa to Vdda (0-5V)) and (Vssa to VDA*2) for input range. In first case the Vref goes to 1.024V read only, in the second case to 2.500V read only, and in the 3rd case it can be set... but does not work for 3.3V. Do you have any other idea?

              • 4. Re: ADC_SAR config

                Oh my, that was "not enough coffee" error :( Yes, the SAR ADC measures only to 2.048V. If you need a larger range, either use a voltage divider, use the DelSig ADC (which can do 6*Vref) or measure from GND to Vdda.

                   

                Apart from using an external reference, there is no range that goes up to 3.3V exactly. Why doe you need that exact range - just use the next higher one...

                • 5. Re: ADC_SAR config

                  thanks for response again! To say the through I do not need the 3.3V exatly I just wondered if I set the input range to GND to Vdda and Vdda was set to 3.3 V and the displayed voltage on LCD went from 0v up to 5V (using the onboard potentiometer) ..... I have checked the real voltage on potentiometer with voltmeter and it was really in 0...3.3V range. Than I tried to find the reason of the measured and displayed values and came to the idea that ADC was not configured corretctly. That's all. 

                  • 6. Re: ADC_SAR config

                    Most likely you did not set the new voltage in the project. In the workspace explorer, go to the "design-wide resources". On the "System" tab you can set the correct voltage.

                    • 7. Re: ADC_SAR config

                      Bingo, that's it! Thank you for your kind help! (sorry for late response ...)