ADC setup for 16F716


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2004
    Location
    Calabasas, CA
    Posts
    84

    Default ADC setup for 16F716

    Will these settings set PortA.3 as an analog input?

    ADCON1 =0
    TRISA =255
    DEFINE OSC 3 '3.56 MHz oscilator
    DEFINE ADC_BITS 8 'Result resolution
    DEFINE ADC_CLOCK 3 'Sets internal RC clk(2-6us)
    DEFINE ADC_SAMPLEUS 5 'Cap sample time of 5us

    code:
    ADCIN PORTA.3,w7 'Ck for vibration

    Then I SEROUT to an LCD display.

    Nothing else required to set for this multi functional (Vref) pin?

    I get the other PortA pins to work, but not this PortA.3 pin (although I have op amp inputs on the others).
    Is there a minimum input current requirement to be able to be read by the PIC?
    I have 1.5V going through a 1k allowing for 1.5mA of current input to the pic.

    Thanks
    James

  2. #2
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    ADCIN PORTA.3,w7 'Ck for vibration
    The ADCIN statement uses the AN number instead of the PORT.PIN
    Code:
    ADCIN 3,w7 'Ck for vibration
    DT

  3. #3
    Join Date
    Nov 2004
    Location
    Calabasas, CA
    Posts
    84


    Did you find this post helpful? Yes | No

    Default

    That would do it. Thanks you so much.
    James

Similar Threads

  1. Stable Adc Reading Routine
    By gebillpap in forum General
    Replies: 27
    Last Post: - 13th May 2015, 02:18
  2. Can't get ADC to loop
    By TravisM in forum mel PIC BASIC
    Replies: 2
    Last Post: - 11th October 2009, 15:33
  3. ADCIN setup for PIC16F688
    By PixController in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 29th February 2008, 18:38
  4. ADC value with 2 decimals on an LCD
    By Squibcakes in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 2nd December 2005, 15:54
  5. 12F675 ADC 'Issues'
    By harrisondp in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 31st March 2005, 01:55

Members who have read this thread : 1

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