ADC Question


Closed Thread
Results 1 to 8 of 8

Thread: ADC Question

Hybrid View

  1. #1
    Join Date
    May 2013
    Location
    australia
    Posts
    2,705


    Did you find this post helpful? Yes | No

    Default Re: ADC Question

    you might need another read of the hardware manual for a 16f688
    'Define ADCIN parameters
    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
    ANSEL = %00000111 ' Enable ADC channels AN2-AN0
    ADCON1 = %10000000 ' Set PORTA analog and right justify result ?????????????
    this will REALLY be
    ADCON1 = %10000000 ' Set Conversion Clock = FOSC/2 and bit 7 does nothing

    you need

    ADCON0.7=1 ' right justify result




  2. #2
    Join Date
    May 2012
    Location
    Merseyside, UK
    Posts
    237


    Did you find this post helpful? Yes | No

    Default Re: ADC Question

    Hi Richard

    Point taken on ADCON1... My Bad !

    But ADCON0 = %10000001

    BIT 7 = Right justify
    BIT 1 = ADC Enable

    BR
    Andy

Similar Threads

  1. ADC Question
    By Art in forum General
    Replies: 0
    Last Post: - 24th January 2012, 03:35
  2. ADC question again
    By Bobbo_ZA in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 7th May 2010, 14:02
  3. ADC question
    By Srigopal007 in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 8th June 2007, 10:52
  4. A question about ADC (using Pic16f876)
    By mimmmis in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 2nd April 2007, 17:26
  5. ADC question
    By schu4647 in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 28th May 2006, 15:15

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