some problem with a pic adc


Closed Thread
Results 1 to 3 of 3
  1. #1

    Default some problem with a pic adc

    i try to work with the adc (12bit) of the pic16f1786. My settings are as follows:

    ANSELA = %00010111
    ADCON0 = %01111101 ' Using 12 Bit, Fixed Voltage reference
    ADCON1 = %11110011 ' 2's Compliment, FRC, VREF- to VSS(ADNREF), VREF to FVR
    ADCON2 = %00001111 ' ADC Negative to VSS
    FVRCON = %11001111 ' Enable FVR, and 4.096v Reference
    WPUA = %00000000

    But when I try to acquire from a source it gives me a somewhat incorrect value, if I dont understand it. The measured source with the digital voltmeter gives 1.40 volts while the pic gives me the value 1435. But with a fvr of 4.096 volts and 12 bits (4096 levels) does not have a 1: 1 ratio? That is 1435 means 1,435 volts?

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


    Did you find this post helpful? Yes | No

    Default Re: some problem with a pic adc

    If I read the datasheet properly the accuracy specification on the FVR is +/- 3% so you're still within that window.

    Vdd must be above 4.75V and there's a comment saying the specification is valid for the industrial temperature range part only. What's your Vdd and exact part number?

    Also, are you doing any filtering/averaging in your code? You might benefit from that if you have noise coupled into your signal which your DMM filters out.

    /Henrik.

  3. #3


    Did you find this post helpful? Yes | No

    Default Re: some problem with a pic adc

    thank you henrik, the averaging seems to be good but today i will try to check the "zeroing", maybe the problem is there. the Vdd comes from a common 7805 and it's something near 4,97 volts....

Similar Threads

  1. ADC problem on 18F46K22 device using all 28 ADC pins
    By JimAvanti in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 23rd February 2012, 20:22
  2. ADC problem :(
    By Kaldurenik in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 4th December 2007, 14:54
  3. ADC problem
    By showtime in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 28th November 2007, 23:21
  4. Problem with ADC
    By savnik in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 25th November 2006, 07:37
  5. ADC problem
    By NacNud in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 15th December 2004, 02:27

Members who have read this thread : 2

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