Can't set FVR voltage on PortA.2


+ Reply to Thread
Results 1 to 2 of 2

Thread: Can't set FVR voltage on PortA.213 days old

  1. #1
    Member yvesmazzon's Avatar
    Join Date
    Jul 2006
    Posts
    213
    Thumbs Up
    Received: 6
    Given: 34
    Total Downloaded
    11.21 GB

    0 Not allowed!

    Default Can't set FVR voltage on PortA.2

    Dear all,
    I'm using the 18F25k22 chip. I have set the chip ADC.0 to use the internal reference voltage of 2.048V. No problem there. Where I'm failing even after reading back and forth the chip spec sheet is to have VREF output on the PortA.2 that can also be DACout. I have tried to manipulate the VREFCON1 to do so by setting it at %11101000 but not getting any output voltage on that pin. I know this setup is for DAC but will it possible to set it to produce the internal voltage when using ADC? Many thanks in advance for your time.

    Regards,

    Yves
    Attached Thumbnails Attached Thumbnails Vrefcon1.jpg‎  

Attention

This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

The advertisements we display are relevant to this web site and your browsing history

Please consider supporting us by disabling your ad blocker.


Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

If you can, please report issues in the forum area WebSite / Forum Issues


Thank you for your attention.

  • #2
    Senior Member Stephen Moss's Avatar
    Join Date
    Jan 2006
    Posts
    511
    Thumbs Up
    Received: 31
    Given: 7
    Total Downloaded
    3.72 GB

    0 Not allowed!

    Default Re: Can't set FVR voltage on PortA.2

    You have only shown how oyu have set up VREFCON0, not all the relevant registers so that we can check for errors but I think you need to set...
    VREFCON0 = $E0 'FVR Enabled, Output ready for use, 2.084V
    VERFCON1 = $E4 'DAC Enabled, Positive Ref selected, Output of DACOUT pin, +ve source is FVR Buffer 1 output, negative source = 0V and finally
    VREFCON2 = $1F 'Select the highest output voltage.

    If you look at figure 22-1 on page 344 you will see that is not a true D-A converter in that you do not send it a digital value that is then convertered to analogue. Instead it is more like a digital potentiometer (made of 32 resistors), the +Ve & -Ve references set the voltage across the potentiometer. The DACR bits of the VREFCON2 register determines which of the 32 voltage taps is provided.

    Therefore if you are using FVR as the +Ve input source and want that voltage out you need to select the highest tap (might give 2.020V), if you want half that voltage out (1.042V) then VREFCON2 = 0F, a quarter (0.512V) and VREFCON2 = $08.
    Alternatively, if something close to the FVR voltage is sufficient you could use VDD (assuming 5V) as the +Ve source for the DAC and VREFCN2 = $0D or $0E.
    Last edited by Stephen Moss; 3rd December 2019 at 10:59.

  • Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

    Thread Information

    Users Browsing this Thread

    There are currently 1 users browsing this thread. (0 members and 1 guests)

       

    Similar Threads

    1. [SOLVED !] Noise on embedded op-amps and FVR
      By david in forum The Lounge
      Replies: 3
      Last Post: 26th July 2016, 07:53
    2. Replies: 2
      Last Post: 26th January 2016, 03:20
    3. Using FVR (Fixed V Ref with ADC) ?
      By Kapitan in forum The Lounge
      Replies: 1
      Last Post: 12th June 2012, 15:49
    4. Replies: 14
      Last Post: 23rd February 2007, 17:47
    5. Can I set the brown out reset voltage from within the code
      By jonnykyoto in forum Proton Plus Compiler v3
      Replies: 5
      Last Post: 8th November 2006, 13:01

    Members who have read this thread since 12th December 2019, 11:44 : 0

    Actions :  (Set Date)  (Clear Date)

    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