Using Fixed Voltage Reference (FVR) for A/D conversion in enhanced mid-range PIC microcontrollers

Here's another great article from Embedded Lab.  The FVR (fixed voltage reference) is included in the 18Fk-series parts with various capabilities.

The reference voltage plays a very important role in any A/D conversion. It determines both the range and the resolution (Volt/Count) of the A/D conversion. Besides, the accuracy of the conversion also depends upon how stable the reference voltage is. Usually in PIC microcontrollers, the reference voltage for A/D conversion can be selected as the supply voltage itself or provided externally through one or more I/O pins. But the new enhanced mid-range family of 8-bit PIC microcontrollers have a built-in module that generates a stable reference voltage internally. It is called Fixed Voltage Reference (FVR) where the output is very stable and independent of the supply voltage (VDD). The output of the FVR can be configured to supply a reference voltage for A/D conversion internally. This article describes how to configure the FVR module to derive the reference voltage of 2.048 V for A/D conversion in PIC16F1827 microcontroller. The analog signal for this experiment is taken from the output of a LM34DZ temperature sensor. After the A/D conversion, the PIC16F1827 displays the temperature on a 2×8 character LCD.

Isn't this an awesome board layout on perfboard?

Read the rest of the article

Related article from Embedded Lab: Voltage monitor for car’s battery and its charging system


Posted: 6 years 9 months ago by Jon Chandler #8596
Jon Chandler's Avatar
The 18F25K20 has an FVR but it can't be used as a reference to the ADC. The same goal can be accomplished but it takes a couple steps.

1. Use Vdd as the reference, which is nominally 5 volts.

2. Measure the FVR with Vdd as reference.

3. Calculate what Vdd actually is by calculating the offset of the measured FVR vs what it actually is.

4. Use the actual Vdd level in your other calculations.
Posted: 6 years 9 months ago by MMcLaren #8597
MMcLaren's Avatar
Why would the "enhanced" mid-range parts, including the lowliest 8-pin 12F1822 and 12F1840, have full FVR capabilities while the 18F parts only have a subset of those capabilities?
Posted: 6 years 9 months ago by jmessina #8600
jmessina's Avatar
Good question.

Maybe there's a method to the madness, but lately it looks to me like when they go to make a new chip they take all the peripheral modules, throw 'em up in the air, and whatever drops on the datasheet is what the part gets.
Posted: 6 years 9 months ago by Graham Mitchell #8604
Graham Mitchell's Avatar
Maybe there's a method to the madness, but lately it looks to me like when they go to make a new chip they take all the peripheral modules, throw 'em up in the air, and whatever drops on the datasheet is what the part gets.
Nice Jerry Certainly appears that way
Posted: 6 years 9 months ago by be80be #8607
be80be's Avatar
I never seen a 18F in a Li-ion Battery but some do have 12F in them to make sure there charging right. I would say it's more of a plan.
Posted: 6 years 9 months ago by Jon G #8609
 Jon G's Avatar
Pardon???
Posted: 6 years 9 months ago by be80be #8610
be80be's Avatar
Pardon???
Pardon what it is in the plan if you want to maximal use of a low pin count chip you would want all the options you can stuff in it.

You don't see 28 and 40 pin pics in things that are used every day there the smaller 10f 12f and 16f chips with less then 20 pins. There in thing that read temp and Li-ion battery's and all kinds of auto parts that handle controls of heat air and fuel.
Posted: 6 years 9 months ago by Jon Chandler #8611
Jon Chandler's Avatar
... if you want to maximal use of a low pin count chip you would want all the options you can stuff in it...

Huh? Wouldn't you think they'd want "maximal use" of all of their products?
Posted: 6 years 9 months ago by Jon G #8612
 Jon G's Avatar
I know what you meant. It just didn't make much sense and was difficult to read.

In line with what Jon asked: You won't see an 18F chip in a Li-Poly because it would be overkill. If we followed your logic as it reads, there would be no reason for 18F chips at all, just specialized 8 pin 10F and 12F series chips.
Posted: 6 years 9 months ago by jmessina #8613
jmessina's Avatar
I think what Burt's saying is that they target a particular application with some of the low pin count parts, and then put whatever peripherals into the chip they think you might need for that application. Every once in a while I run across a chip that has a really unique little function module I've never seen before in any other part.

Trouble is, they tend to guess wrong a lot (IMHO). Things like having a voltage reference and an ADC together is a VERY handy combination if you actually want to measure something.

Forum Activity

Member Access