Pic16f1825 adcon0


Closed Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2009
    Posts
    17

    Default Pic16f1825 adcon0

    Hi,
    i'm using PIC16F1825 for the first time and want to use RC2 as analog input.
    Therefore i want to use the internal voltage reference (4.096V).
    I set the FVRCON = %10000011.
    But there is an item in the ADCON0 that i don't understand...
    I think i have to use ADCON0 = %00011001 for using analog channel 6?
    But what means (bit6-2) "11111 = FVR (Fixed Voltage Reference) Buffer 1 Output?
    What is this for?
    Must i use this for my reference voltage?

    Thanks in advance
    best regards
    norbert

  2. #2
    Join Date
    Jan 2011
    Location
    Sydney, Australia
    Posts
    172


    Did you find this post helpful? Yes | No

    Default Re: Pic16f1825 adcon0

    Hi Norbert,

    I used the PIC16F1825 in a recent project with ADC input on AN0.
    I used FRVCON = %11010011 to enable the fixed voltage reference and set the voltage to 4.096V.
    Your ADCON0 = %000110001 is correct for selecting AN6 as the ADC channel (RC2).
    To apply the fixed voltage reference to the ADC you must set bit 1-0 of ADCON1 to "11"
    In my application I used ADCON1 = %10100011 to right justify the output, set A/D clock to Fosc/32 and set Vref- to VSS.
    You may need to change the A/D clock selection depending on you own oscillator choice.

    Cheers
    Barry
    VK2XBP

  3. #3
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,605


    Did you find this post helpful? Yes | No

    Default Re: Pic16f1825 adcon0

    Hi,
    But what means (bit6-2) "11111 = FVR (Fixed Voltage Reference) Buffer 1 Output?[
    It simply selects the output of the FVR and "connects it" to the ADC input in order to sample it, just as any other input.

    What is this for?
    It can be used to "calibrate" the ADC when you're not actually using the FVR as VRef for the ADC.

    Must i use this for my reference voltage?
    No, in your case, with the output of the FVR used as VRef for the ADC there's no need to sample the FVR output - it would/should Always return a result of 1023.

    /Henrik.

  4. #4
    Join Date
    Jan 2009
    Posts
    17


    Did you find this post helpful? Yes | No

    Default Re: Pic16f1825 adcon0

    Hello Barry / Henrik,
    thanks for reply, it helped me understanding this function.
    I did my settings this way - everything's fine.
    Thanks for help.
    Norbert

Similar Threads

  1. PIC16F1825 unable to Light an LED
    By Lestat in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 16th March 2013, 18:38
  2. Adcon0,adcon1 pic 16f877
    By Eden Zeminian in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 25th April 2011, 22:00
  3. Replies: 5
    Last Post: - 10th April 2011, 12:48
  4. adcon0,adcon1
    By jonas2 in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 14th September 2009, 09:42
  5. ADC_Clock Vs ADCON0
    By locko in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 16th August 2007, 15:09

Members who have read this thread : 0

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