16F887 - PORT pins interfere with each other when set high/low


Closed Thread
Results 1 to 24 of 24

Hybrid View

  1. #1
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,170


    Did you find this post helpful? Yes | No

    Default Re: 16F887 - PORT pins interfere with each other when set high/low

    Obviously you missed that the default is all inputs set to ANALOG IN.

    So if you do not do anything all ports with ADC support are, by default, on Power On set analog inputs!

    Even if you don't use ANSELx.

    But if you use BOTH ANSEL and ANSELH to set the digital and analog inputs, it is not possible to have analog in on PortB.0 using this:

    ANSEL=%00000001
    ANSEL=%00000000

    PortB.0 will be Digital, either in or out defined by TRIS.

    Ioannis

  2. #2
    Join Date
    Feb 2013
    Posts
    1,153


    Did you find this post helpful? Yes | No

    Default Re: 16F887 - PORT pins interfere with each other when set high/low

    I have all TRIS and other settings set

  3. #3
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,170


    Did you find this post helpful? Yes | No

    Default Re: 16F887 - PORT pins interfere with each other when set high/low

    Not enough. If you want it as digital in then you have to reset the appropriate bits in ANSEL/ANSELH.

    Ioannis

Similar Threads

  1. Replies: 10
    Last Post: - 14th April 2014, 21:47
  2. 16F887 PORTC.7 high
    By Neosec in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 31st March 2013, 23:39
  3. Help in trying to set pins functions
    By MinesCoffee in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 8th December 2012, 19:03
  4. PortB pins will not initialize LOW, only HIGH?
    By ronbowalker in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 8th December 2009, 20:27
  5. Replies: 0
    Last Post: - 25th May 2005, 11:35

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