A/D Problems!


Closed Thread
Results 1 to 5 of 5

Thread: A/D Problems!

Hybrid View

  1. #1
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    let's review it together you declared..
    Code:
    ANSEL = %00110001
    There you set correctly the FRC as ADCS BUT you set only GPIO.0(ANS0) as analog. If this is what you want... it's not what you said
    GPIO.5 for Analog input
    .
    .
    .
    .
    ' Set ADC clock to Frc and GP0 & GP1 to analog mode
    So if you want to use ANS0 (GPIO.0) as analog input for your ADC, you should also disable the analog comparator multiplexed on GPIO<1:0>
    CMCON=7

    Later you set ADCON0=%10000001 which says correctly you want to read from ANS0.

    That must be it... or a part of. Personnaly i'll enable the POWER-UP timer to keep boot settle time safe.

    Depending of your hardware, you can also try to use a slower ClockSource and or adding a little pause after the Go/Done bit test.

    Where your signal come from?
    Is it met the maximum impedance of the A/D as stated in the datasheet?
    Last edited by mister_e; - 20th May 2006 at 10:25.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  2. #2
    Join Date
    Mar 2005
    Posts
    37


    Did you find this post helpful? Yes | No

    Default

    I should take the time and read what I post! I am down to the last part of the project and now this. I have 4 units working perfectly in the field without any problems.

    ANSEL = %00110001 is correct I need GPIO.0 not GPIO.5.

    I am interfacing with an AD595 to read a thermocouple the output is 10mv/c. I measure the voltage at the sensor output and at the PIC input GPIO.0 and am getting the same 214mv.

    Thanks for the reply,

    Scott

  3. #3
    Join Date
    Mar 2005
    Posts
    37


    Did you find this post helpful? Yes | No

    Default

    I think I found the problem! I have changed the battery used for the sensor from a 3.6V to a 3.8V Lithium-ion. I use a 5V charge pump to power the AD595 and the PIC12. The Charge Pump must have its SKIP pin high for voltages greater than 3.6V. Once jumpered to positive terminal of my battery everything seems to be working well.

    I will allow the PIC12 to handle this in the future for when the battery falls below the 3.6V threshold.

    I will keep everyone posted!

    Scott

  4. #4
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Perfect occasion to move your A/D input to another and use the internal comparator to detect it.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. A/D problems
    By Roddy Wayne in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 4th June 2009, 03:57
  2. 12f675 A/d Miseries
    By MARAD75 in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 16th December 2008, 03:16
  3. 12F675 A/D and GPIO sleep interrupt
    By macinug in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 8th September 2008, 15:39
  4. Need advice on A/D
    By james in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 24th August 2007, 20:30
  5. A/D converter fails?
    By egberttheone in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 13th February 2006, 19:57

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