Enabling weak internal pull up resistors on port B


Closed Thread
Results 1 to 9 of 9

Hybrid View

  1. #1
    Join Date
    Jul 2010
    Posts
    10


    Did you find this post helpful? Yes | No

    Default

    Ok, So let's say for some reason the OPTION_REG is getting reset. What syntax do I use in PicBasic Pro to set it again?

  2. #2
    Join Date
    Nov 2007
    Location
    West Covina, CA
    Posts
    219


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by dbodenheimer View Post
    ok, so let's say for some reason the option_reg is getting reset. What syntax do i use in picbasic pro to set it again?
    option_reg.7=0
    Louie

  3. #3
    malc-c's Avatar
    malc-c Guest


    Did you find this post helpful? Yes | No

    Default

    I've often found internal pull-ups troublesome and simply use small external resistors between 4.7K and 10K depending on the input device

  4. #4
    Join Date
    Oct 2010
    Posts
    27


    Did you find this post helpful? Yes | No

    Default

    In that thought process, it appears option_reg.7 = 0 sets all 4 port B pull ups on an 16F88. Can one of those pins then be used as a serial output? I don't see where you can set individual pins.......

  5. #5
    Join Date
    Mar 2009
    Posts
    653


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Plcguy View Post
    In that thought process, it appears option_reg.7 = 0 sets all 4 port B pull ups on an 16F88. Can one of those pins then be used as a serial output? I don't see where you can set individual pins.......
    On a 16f690, I do this to get the weak pullups working...

    Code:
    option_reg.7=0 ' Enable WPUs by individual pin 
    WPUB = %11110000  'enable weak pullups on RB7, RB6, RB5 & RB4
    It all works weally weakpullup-tastically (but disable any other PIC stuff that maybe sharing those ports...and make sure they're all set as inputs)
    Last edited by HankMcSpank; - 8th October 2010 at 16:06.

Members who have read this thread : 1

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