PIC16F1503 - Absence of Fixed Voltage Reference to ADC

Discussion about projects that used PIC Microcontroller, Hardware Interface, Programming Algorithm and etc......

PIC16F1503 - Absence of Fixed Voltage Reference to ADC

Postby Brian Griffin » Sun Mar 18, 2012 12:21 pm

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
PIC - UIC00B from Cytron (replacement for my broken PICKit 2), Pickit 3, MikroC for PIC
dsPIC - MikroC for dsPIC, mikromedia board (dsPIC33)
AVR - AVR Dragon
Parallax - Prop tool
User avatar
Brian Griffin
Enthusiast
 
Posts: 403
Joined: Mon Jan 17, 2011 9:36 am

Re: PIC16F1503 - Absence of Fixed Voltage Reference

Postby sich » Sun Mar 18, 2012 4:35 pm

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-)
~> How to ask QUESTIONS the SMART way in FORUM? <~
User avatar
sich
Moderator
 
Posts: 604
Joined: Tue Apr 21, 2009 2:15 pm

Re: PIC16F1503 - Absence of Fixed Voltage Reference

Postby Brian Griffin » Mon Mar 19, 2012 12:12 am

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. :)
PIC - UIC00B from Cytron (replacement for my broken PICKit 2), Pickit 3, MikroC for PIC
dsPIC - MikroC for dsPIC, mikromedia board (dsPIC33)
AVR - AVR Dragon
Parallax - Prop tool
User avatar
Brian Griffin
Enthusiast
 
Posts: 403
Joined: Mon Jan 17, 2011 9:36 am

Re: PIC16F1503 - Absence of Fixed Voltage Reference to ADC

Postby sich » Mon Mar 19, 2012 10:27 am

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.
~> How to ask QUESTIONS the SMART way in FORUM? <~
User avatar
sich
Moderator
 
Posts: 604
Joined: Tue Apr 21, 2009 2:15 pm

Re: PIC16F1503 - Absence of Fixed Voltage Reference to ADC

Postby Brian Griffin » Mon Mar 19, 2012 11:34 am

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
PIC - UIC00B from Cytron (replacement for my broken PICKit 2), Pickit 3, MikroC for PIC
dsPIC - MikroC for dsPIC, mikromedia board (dsPIC33)
AVR - AVR Dragon
Parallax - Prop tool
User avatar
Brian Griffin
Enthusiast
 
Posts: 403
Joined: Mon Jan 17, 2011 9:36 am

Re: PIC16F1503 - Absence of Fixed Voltage Reference to ADC

Postby kl84 » Thu Mar 22, 2012 10:12 pm

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
User avatar
kl84
Amateur
 
Posts: 166
Joined: Thu Jul 08, 2010 12:14 pm

Re: PIC16F1503 - Absence of Fixed Voltage Reference to ADC

Postby takao21203 » Mon May 07, 2012 6:34 am

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.
User avatar
takao21203
Discoverer
 
Posts: 111
Joined: Mon Mar 19, 2012 7:52 pm
Location: Ireland, Europe


Return to PIC Microcontroller

Who is online

Users browsing this forum: No registered users and 0 guests