switch on 1 weak pullup on portb?


Closed Thread
Results 1 to 5 of 5
  1. #1

    Default switch on 1 weak pullup on portb?

    Hello Everyone. Is there a way to switch on a weak pullup on just one port on a 16F73? I know how to do it on the 12F series and I know OPTION_REG.7=0 will switch on all of them on portb, but I only want portb.1 to have a weak pullup. Thank you.

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


    Did you find this post helpful? Yes | No

    Default

    From the datasheet.
    Each of the PORTB pins has a weak internal pull-up. A
    single control bit can turn on all the pull-ups. This is performed
    by clearing bit RBPU (OPTION_REG<7>). The
    weak pull-up is automatically turned off when the port
    pin is configured as an output.
    And
    2: To enable weak pull-ups, set the appropriate TRIS
    bit(s) and clear the RBPU bit (OPTION_REG<7>).
    But I bet you want the other pins to be inputs also?
    Dave
    Always wear safety glasses while programming.

  3. #3


    Did you find this post helpful? Yes | No

    Default

    Actually, I'm switching the other portb's back & forth from outputs back to inputs in different areas of the program. I don't believe you can turn the pullups on individually. It's all or none.

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


    Did you find this post helpful? Yes | No

    Default

    Depending on what you are out putting to, an external pull up might be the best solution. Use a high value.
    Dave
    Always wear safety glasses while programming.

  5. #5
    Join Date
    Aug 2006
    Location
    Omaha, Nebraska USA
    Posts
    263


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mackrackit View Post
    Depending on what you are out putting to, an external pull up might be the best solution. Use a high value.
    For a weak pull-up, I'd suggest 100K. Otherwise, I'd use 10K.
    Russ
    N0EVC, xWB6ONT, xWN6ONT

    "Easy to use" is easy to say.

Similar Threads

  1. Thermo 7 segments - little problem
    By fratello in forum mel PIC BASIC Pro
    Replies: 49
    Last Post: - 27th July 2013, 07:31
  2. PICs can do more if use others than delays instructions
    By hardcore in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 24th February 2010, 19:52
  3. one line led light make image
    By bioul in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 13th February 2008, 12:19
  4. HSERIN doesn´t work
    By wurm in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 29th July 2007, 14:23
  5. Output PIC module
    By freelancebee in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 12th September 2005, 20:10

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