Announcements
IMPORTANT: Cypress Developer Community is transitioning on October 20th. To learn more and be prepared for this change, check out our latest announcement.
cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 5, 3 & 1 MCU

Anonymous
Not applicable


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
 

0 Likes
1 Solution
HeLi_263931
Honored Contributor II

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.

View solution in original post

0 Likes
7 Replies
HeLi_263931
Honored Contributor II

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.

0 Likes
Anonymous
Not applicable

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?

0 Likes
HeLi_263931
Honored Contributor II

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...

0 Likes
Anonymous
Not applicable

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. 

0 Likes
HeLi_263931
Honored Contributor II

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.

View solution in original post

0 Likes
Anonymous
Not applicable

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

0 Likes
rola_264706
Honored Contributor II

Here are some design point for signals.