A/D Problems!


Results 1 to 5 of 5

Thread: A/D Problems!

Threaded View

  1. #2
    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 09:25.
    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, 02:57
  2. 12f675 A/d Miseries
    By MARAD75 in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 16th December 2008, 02:16
  3. 12F675 A/D and GPIO sleep interrupt
    By macinug in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 8th September 2008, 14:39
  4. Need advice on A/D
    By james in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 24th August 2007, 19:30
  5. A/D converter fails?
    By egberttheone in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 13th February 2006, 18: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