Help with DS18B20 program


Results 1 to 39 of 39

Threaded View

  1. #5
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Post

    If you plan to use a pin that has A/D on it for digital I/O, then you for sure want to disable
    the A/D feature for that pin. Otherwise it reads as 0.

    ADCON1 = 15 turns off all A/D. See the data sheet REGISTER 19-2: ADCON1: A/D CONTROL
    REGISTER 1 section.

    Where you see a D in the A/D Port Configuration Control Bits chart, this indicates Digital for
    that pin. Where you see an A, this indicates the pin is configured for Analog.

    Another option is to use PBADEN config bit. If PBADEN = 0 then AN0-AN7 are analog by default at POR
    (power on reset). AN8 to AN12 are digital. If PBADEN = 1 then PCFG 2 to 0 = 1, which means AN0 to AN12
    pins are analog

    Look at the chart in your data sheet. If ADCON1 = 0 then all pins with analog capabilities are
    Analog. If ADCON1 = 15 what are they?
    Last edited by Bruce; - 19th November 2007 at 22:32.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

Similar Threads

  1. Presetting Configuration Fuses (PIC Defines) into your Program
    By Melanie in forum FAQ - Frequently Asked Questions
    Replies: 82
    Last Post: - 15th December 2013, 09:54
  2. Replies: 1
    Last Post: - 23rd May 2009, 09:22
  3. Compile and Program help using PICKit2
    By ozarkshermit in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 10th March 2009, 14:51
  4. Making Program Code Space your playground...
    By Melanie in forum Code Examples
    Replies: 15
    Last Post: - 19th July 2008, 08:26
  5. PIC16F684 Program question
    By Nicholas in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 28th December 2006, 14:30

Members who have read this thread : 3

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