analog issues, what am I missing?


Closed Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2005
    Location
    NC, USA
    Posts
    53

    Default analog issues, what am I missing?

    I am using a PIC18F2220. AN2 is impacted by AN1. I think I have the compators turned off, but AN2 is acting like they are on.... ANy ideas. Thanks

    This is how I have initialized the analog...

    ADCON0 = %00000001 ' Enable A/D
    ADCON1 = %00001100 ' Anolog AN0-AN2, all else digital
    ADCON2 = %10000111 ' right justify result
    CMCON = %00000111 ' Comparators OFF to allow inputs on pins CMCON = 7
    INTCON = %00000000 ' all interrupts OFF
    Define ADC_BITS 10 ' Set number of bits in result
    Define ADC_CLOCK 3 ' Set clock source (3=rc)
    Define ADC_SAMPLEUS 50 ' Set sampling time in uS

  2. #2
    Join Date
    Aug 2005
    Location
    NC, USA
    Posts
    53


    Did you find this post helpful? Yes | No

    Cool Nevermind....

    It helps if you have your analog souce attached to the correct pin...

    Sorry for the unessary post, I guess I just needed to step away from it a while to see the obvious.

Similar Threads

  1. pic18f analog comparator problem
    By david.silaghi in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 6th May 2009, 09:38
  2. PIC18F4550 Error[128] Missing Arguments
    By damalu in forum mel PIC BASIC
    Replies: 9
    Last Post: - 17th November 2008, 21:47
  3. 16F88 Analog In
    By Mugelpower in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 25th March 2008, 08:30
  4. Help with Analog Interrupt
    By brid0030 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 13th February 2008, 18:14
  5. analog inputs on 16F716
    By schwinn_rider in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 6th October 2005, 04:07

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