Fixed Voltage Reference


Closed Thread
Results 1 to 9 of 9

Hybrid View

  1. #1
    Join Date
    Jun 2009
    Posts
    20

    Default Fixed Voltage Reference

    I am trying to read 10 bit resolution voltages pins AN0 and AN2 on a 16F616. I see on the data sheet that ADCON0 bits 5 – 2 can be used to configure a fixed voltage reference of 0.6V or 1.2V. Is this equivalent to setting up an external voltage reference on the VREF pin? If so, how would I set bit 6 of the ADCON0 register to use this internal reference, or have I misunderstood this thing completely?

  2. #2
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,520


    Did you find this post helpful? Yes | No

    Default Re: Fixed Voltage Reference

    Hi,
    I've never used that chip but as far as I can see the fixed voltage reference can only be used as "input" to the comparator(s) in the chip - it can not be used as a reference for the ADC. The fixed voltage reference can however be measured by the ADC by selecting the proper "channel" via ADCON0.

    Section 9.1.3 spells it out:
    The VCFG bit of the ADCON0 register provides control of the positive voltage reference. The positive voltage reference can be either VDD or an external voltage source.
    .

    Since the ADC is ratiometric but the 0.6V fixed voltage reference is not (I'm not sure about the 1.2V one) you should be able to compensate for any drift in Vdd (if that what you're using for VRef+) by sampling the fixed voltage reference and calculate the actual Vref voltage.

    /Henrik.

  3. #3
    Join Date
    Jun 2009
    Posts
    20


    Did you find this post helpful? Yes | No

    Default Re: Fixed Voltage Reference

    Thanks for the info... i guess an external voltage divider is in order.

  4. #4
    Join Date
    Mar 2006
    Location
    China
    Posts
    266


    Did you find this post helpful? Yes | No

    Default Re: Fixed Voltage Reference

    You might have to consider what you want to measure. If your goal is to measure 10 bit resolution in an absolute accurate way I you probably need an external precition voltage reference. If you use 2 resistors as a divider your power supply will be a big part of the result.

    Even if you could use the internal voltage reference it is far from accurate.

    Have a look at Microchip, they have lots of voltage reference solutions.

  5. #5
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default Re: Fixed Voltage Reference

    I have used National LM4120-4.096 references for years. 4mV /bit with 10 bit converters, 1mV /bit with 12 bit converters. 0.2% accuracy. I use those and 0.1% resistors in my voltage dividers. If you do oversampling, you can get within a few millivolts of a calibrated FLUKE DVM over a wide range.
    Charles Linquist

  6. #6
    Join Date
    Jun 2009
    Posts
    20


    Did you find this post helpful? Yes | No

    Default Re: Fixed Voltage Reference

    Thank you for the suggestion.

  7. #7
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    891


    Did you find this post helpful? Yes | No

    Default Re: Fixed Voltage Reference

    Hello Charles,

    Would you have a code sample to help me for a quick start please?

    I'm trying to make a voltmeter for batteries up to 2,5 Volts with a 0,01V precision but I never made a circuit using a voltage reference.

    Thanks in advance for any info
    Roger

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts