Page 1 of 1
PIC16F1937 reference voltage for A/D-conversion
Posted: Thu Dec 06, 2018 12:15 pm
by Uhrenfan
The PIC16F1937 has selectable 1.024/2.048/4.096V voltage references on chip.
How can I use these stable values in FC8 ?
When I start a project with this chip and open the "properties-settings"- window there is no option to implement these values.
Is it necessary to implement C-Code ?
Re: PIC16F1937 reference voltage for A/D-conversion
Posted: Thu Dec 06, 2018 2:33 pm
by Benj
Hello,
In the ADC component properties it should be possible to assign the FVR as the VREF option.
Currently you do need a C-code icon to setup the voltage of the FVR module but this should be fairly straightforward.
Configure for 1.024V
Configure for 4.096V
Let us know how you get on.
Re: PIC16F1937 reference voltage for A/D-conversion
Posted: Thu Dec 06, 2018 7:30 pm
by STibor
Hello,
Have you planned to expand the ADC component of other types of controllers with FVR?
For example: Arduino Nano, Uno, Mega, PIC12F1822
Re: PIC16F1937 reference voltage for A/D-conversion
Posted: Fri Dec 07, 2018 12:25 pm
by Benj
Hello,
Have you planned to expand the ADC component of other types of controllers with FVR?
For example: Arduino Nano, Uno, Mega, PIC12F1822
No plans but as it was quick to do these are all done now and available on the update system.
Re: PIC16F1937 reference voltage for A/D-conversion
Posted: Sun Dec 09, 2018 11:46 am
by Uhrenfan
Hello Benj,
thank you for your precise advice.
I opened a C-Window, defined the VFRCON-Register with the proposed values, compiled and the result ist perfect.
You must know, that I am 78 years old and not very familiar with C-Code. That is the reason why I use FC. That means, for special problems I need your advice.
Another Question: In older Version of FC (until V5) there was under properties a section "customer code" which could be modified if necessary.
This is very interesting, e.g. for implementing of vref+ and vref- to get higher resolution in a special voltage area. I can not find this section in the new versions (starting with V6).
Please can you tell me, where I can find it now ?
With kind regards
P. A. Moser, Linz, Austria
Re: PIC16F1937 reference voltage for A/D-conversion
Posted: Mon Dec 10, 2018 9:11 am
by LeighM
In older Version of FC (until V5) there was under properties a section "customer code" which could be modified if necessary
You are correct, later versions do not have this custom code feature.
But C code can be included with the C icon, also users can create their own components, including C code routines.