PIC16F887 internal pull-ups

Author
xcom2112
New Member
  • Total Posts : 6
  • Reward points : 0
  • Joined: 2016/10/23 08:01:15
  • Location: 0
  • Status: offline
2017/08/12 08:01:56 (permalink)
0

PIC16F887 internal pull-ups

Hi,
 
I wanted to disable the internal pull-up on PIC16F887 RB0.
 
I used the following:
 
ANSELH=0;
OPTION_REGbits.nRBPU =0;
WPUB=0;
 
 
but it's not working....
 
any ideas?
 
Thanks
 
 
#1

4 Replies Related Threads

    mbrowning
    Super Member
    • Total Posts : 418
    • Reward points : 0
    • Joined: 2005/03/16 14:32:56
    • Location: Melbourne, FL
    • Status: offline
    Re: PIC16F887 internal pull-ups 2017/08/12 08:30:30 (permalink)
    +2 (2)
    The best idea I can think of is to study the datasheet some more, particularly sections 2.2.2 and 2.2.2.2. Two of the three registers you mention aren't even in that device.

    Mark
    #2
    NKurzman
    A Guy on the Net
    • Total Posts : 14525
    • Reward points : 0
    • Joined: 2008/01/16 19:33:48
    • Location: 0
    • Status: offline
    Re: PIC16F887 internal pull-ups 2017/08/12 08:38:16 (permalink)
    +1 (1)
    Definitely read about RBPU
    #3
    jtemples
    Super Member
    • Total Posts : 10119
    • Reward points : 0
    • Joined: 2004/02/13 12:31:19
    • Location: Southern California
    • Status: offline
    Re: PIC16F887 internal pull-ups 2017/08/12 10:03:22 (permalink)
    +1 (1)
    mbrowning
    Two of the three registers you mention aren't even in that device.

     
    Are you sure you're looking at the right data sheet?  The OP's code is perfectly valid for this PIC, it just has the polarity of nRBPU wrong.
    #4
    mbrowning
    Super Member
    • Total Posts : 418
    • Reward points : 0
    • Joined: 2005/03/16 14:32:56
    • Location: Melbourne, FL
    • Status: offline
    Re: PIC16F887 internal pull-ups 2017/08/12 17:36:49 (permalink)
    0
    jtemples
    Are you sure you're looking at the right data sheet?

    Dilsexic  error - I saw 877 instead of 887. My bad.

    Mark
    #5
    Jump to:
    © 2017 APG vNext Commercial Version 4.5