Pretty New and need help please


Closed Thread
Results 1 to 4 of 4

Hybrid View

  1. #1
    Join Date
    Apr 2009
    Posts
    18


    Did you find this post helpful? Yes | No

    Question

    Thanks for responding Mackracit!

    Boy, I sure do not understand this!

    I've looked at this link before

    http://www.rentron.com/PicBasic/LM34.htm


    and thought that ADCON1=%00000011 is used when using an external reference voltage and ground with up to 4 analog input channels.

    In looking at the datasheet, it looks to me that ADCON1=%00000010 can be used for up to 5 input channels
    using + 5 VDC and ground as the reference voltage.

    So, I guess what I am asking you is, how can ADCON1=%00000011 be used to read both channels accurately?

    It seems to me that I'd have to switch between ADCON1=%00000011 and ADCON1=%00000010 to be able to do this????

    I think I have two separate variables to store the two A2D channels, do I not?

    Now I am totally confused!

  2. #2
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Confusion is good

    I missed the second 2 on one of your variables.... ooppsss. You do have two separate.

    ADCON1 is used to set the pins to be either digital or analog and if and external VREF is used. The data sheet gives the different options, sometimes the option you want is not an option...

    So no switching after it is set. You have to decide on the pins ahead of time.
    Dave
    Always wear safety glasses while programming.

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