Page 1 of 1

PIC16F1503 - Absence of Fixed Voltage Reference to ADC

PostPosted: Sun Mar 18, 2012 12:21 pm
by Brian Griffin
Many nights ago I bought a handsome amount of PIC16F1503 (it's RM2.76 from Element14), and from the web profile and stuff, it has many nice peripherals such as CLC (Configurable Logic Cells) and NCO (Numerically Controlled Oscillator).

It has also the FVR (Fixed Voltage Reference) and the datasheet claimed that the ADC can be connected to the FVR.

But, I don't see a connection to it. There is no mentions of these at all in the ADC section. Suddenly, the mentions of connecting the FVR to the ADC disappeared in the respective section. It seems that there is a printing error.

Workarounds:

1.) So if you need to have a FVR on the little thing, too bad, it doesn't have it. There is a DAC though, you can tune it to whatever voltage you want and then feed it back to the positive Vref pin. However, you need an Op-Amp and wire it as a buffer between the Vref and the DAC output.

2.) If you need to reduce part count (or cost), use a voltage divider using resistors. Or with a potentiometer. Thing is, cover them with a candle wax after you tune it so that you won't get wrong readings.

3.) Use an external digital potentiometer (the microcontroller has a hardware SPI/I2C) and tune the thing and connect the output back to the Vref pin. This is the most expensive one but it did the job properly.

The ones with the FVR are the PIC16F18xx ones. Lowest end of these are 2x more expensive than the PIC16F1503.

Still the PIC16F1503 has other good stuff inside, so when there's no FVR to the ADC, doesn't mean that it is the end of the world! :D

Re: PIC16F1503 - Absence of Fixed Voltage Reference

PostPosted: Sun Mar 18, 2012 4:35 pm
by sich
Good sharing Brian Griffin! Seems like microcontrollers have became more and more 'configurable'...very useful for smart ones to play more tricks with it 8-)

Re: PIC16F1503 - Absence of Fixed Voltage Reference

PostPosted: Mon Mar 19, 2012 12:12 am
by Brian Griffin
sich WROTE:Good sharing Brian Griffin! Seems like microcontrollers have became more and more 'configurable'...very useful for smart ones to play more tricks with it 8-)


Thanks. These newer PIC16F contains also a Temperature module inside. It can give a good estimate of the temperature of the microcontroller and its surroundings.

But don't expect it to replace the LM35, though. :)

Re: PIC16F1503 - Absence of Fixed Voltage Reference to ADC

PostPosted: Mon Mar 19, 2012 10:27 am
by sich
After being triggered by your post, I went to search for the PIC16F1503 datasheet.

As you've mentioned, I can find the Fixed Voltage Reference section in the document, somewhere at page 113-114. Everything seems fine until I looked into the ADCON1 register. There's no connection to the FVR output! Then I refer to PIC16F1823 datasheet and found that the ADCON1 register has the option.

Thanks for the discovery! May be you should log a ticket in Microchip Support regarding this error.

Re: PIC16F1503 - Absence of Fixed Voltage Reference to ADC

PostPosted: Mon Mar 19, 2012 11:34 am
by Brian Griffin
sich WROTE:After being triggered by your post, I went to search for the PIC16F1503 datasheet.

As you've mentioned, I can find the Fixed Voltage Reference section in the document, somewhere at page 113-114. Everything seems fine until I looked into the ADCON1 register. There's no connection to the FVR output! Then I refer to PIC16F1823 datasheet and found that the ADCON1 register has the option.

Thanks for the discovery! May be you should log a ticket in Microchip Support regarding this error.


It is not an error but the product profile page is extremely inconsistent. I will personally contact Microchip about this situation.

However all is not lost if you still need a thermometer without resorting to buying LM35 or LM34 - it is inside the microcontroller but please take note of its limitations (it is only on-die and outer surroundings temperature).

The FVR can be very convenient if you have to simplify calculations. One of them is you do not need to do floating point calculation at all (if you use 1.024V reference) - just divide the output by 10! :)

I have two PIC16F1826 here on my hand - they have the FVR connected to the ADC but they are two times expensive than the PIC16F1503. :o

Re: PIC16F1503 - Absence of Fixed Voltage Reference to ADC

PostPosted: Thu Mar 22, 2012 10:12 pm
by kl84
Brian Griffin WROTE:The FVR can be very convenient if you have to simplify calculations. One of them is you do not need to do floating point calculation at all (if you use 1.024V reference) - just divide the output by 10! :)

That's right!...Like it! :D

Re: PIC16F1503 - Absence of Fixed Voltage Reference to ADC

PostPosted: Mon May 07, 2012 6:34 am
by takao21203
I was worried about this too.

-I asked on the Microchip forum
-I made experimental program

Result: The FVR will indeed become compared against Vdd.
If Vdd is changed, also the A/D result will change.

So, you can measure Vdd actually, without external reference (which however, often will be needed, if any kind of switching supply is used, or you need lots of filtering, and still get some instability).

You can actually observe this instabilities, and add capacitors, small coils etc., to see improvement for voltage stability.