adcon1/ adcin


Closed Thread
Results 1 to 5 of 5

Thread: adcon1/ adcin

Hybrid View

  1. #1
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    You went from something good like this...

    ADCON1 = 2
    .. ..
    for sample = 0 to 20
    adcin 2 ,temp
    samples= samples + temp
    pause 100
    next sample
    temp = samples / 20

    ...and all you had to do was change ADCIN 2 to ADCIN 0 (PBP Manual!) for it to read from RA0/AN0, to something like your second example which is completely shot.

    For complete definitions of ADCON0 and ADCON1 see your PICs DATASHEET.

  2. #2
    Patrick's Avatar
    Patrick Guest


    Did you find this post helpful? Yes | No

    Talking Adcin adcon1

    Thanks Melanie

    Out of desparation I looked at the sample on the Rentron page where they use the three pots on the inputs of the RA ports of the 16F87X pics,that is where the second example comes from.
    If I program the pic as in example one I have 5volt on pin RA0 and 1 and I want to read from LM34 temp IC
    If I make it Adcon1 = 2 and read on pin 2 and 3 it reads it but I want to know why I cannot get a reading from pin 0 and 1 when the IC is connected.I can also not figure it out on the data sheetsas Adcon1 = 2 makes the pins all analog with no Ref voltage on pins.

    Please if someone can again simplify these settings ,I know that there is being many mails on this subject but,can someone point to a site or mail which makes it simple and just not repeat the data sheet.

    Sometimes I just caun't see the obvious, but then I need help and that is why there is a great forum like this.

    Melanie keep up the good work

    Patrick van Biljon

Similar Threads

  1. ADCIN Problem
    By JavPar in forum General
    Replies: 33
    Last Post: - 20th January 2009, 03:36
  2. ADCIN problems with PIC16F73
    By passion1 in forum mel PIC BASIC Pro
    Replies: 19
    Last Post: - 26th July 2007, 11:38
  3. Adcin or Pot
    By lerameur in forum mel PIC BASIC Pro
    Replies: 18
    Last Post: - 11th January 2007, 16:46
  4. help using adcin
    By harryweb in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 31st January 2006, 07:46
  5. Help with setting adcon1 for 16f877
    By jessey in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 16th August 2005, 11:13

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