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 ?
PIC16F1937 reference voltage for A/D-conversion
Moderator: Benj
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: PIC16F1937 reference voltage for A/D-conversion
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.
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
Code: Select all
FVRCON = 0x81;
Code: Select all
FVRCON = 0x83;
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- STibor
- Posts: 263
- Joined: Fri Dec 16, 2011 3:20 pm
- Has thanked: 116 times
- Been thanked: 113 times
- Contact:
Re: PIC16F1937 reference voltage for A/D-conversion
Hello,
Have you planned to expand the ADC component of other types of controllers with FVR?
For example: Arduino Nano, Uno, Mega, PIC12F1822
Have you planned to expand the ADC component of other types of controllers with FVR?
For example: Arduino Nano, Uno, Mega, PIC12F1822
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: PIC16F1937 reference voltage for A/D-conversion
Hello,
No plans but as it was quick to do these are all done now and available on the update system.Have you planned to expand the ADC component of other types of controllers with FVR?
For example: Arduino Nano, Uno, Mega, PIC12F1822
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: PIC16F1937 reference voltage for A/D-conversion
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
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
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: PIC16F1937 reference voltage for A/D-conversion
You are correct, later versions do not have this custom code feature.In older Version of FC (until V5) there was under properties a section "customer code" which could be modified if necessary
But C code can be included with the C icon, also users can create their own components, including C code routines.