OPTION_REG.7=0…… Or does it ?


Closed Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    May 2012
    Location
    Merseyside, UK
    Posts
    237

    Question OPTION_REG.7=0…… Or does it ?

    Hi all

    Am using a 16f818 in a simple program …all is working BUT :-

    OPTION_REG.7=0 ' Enables all pull-ups on PORTB

    Question is What happens if only PORTB 0-3 are inputs and 4-7 are outputs….I thought I had seen a way of enabling . disabling some pins if this was the case…..

    OR Does telling PBP that pin 4-7 are outputs do it for me ???

    My program is working fine….. Just wondering !

    Thank you for reading

    Andy
    Last edited by Archangel; - 12th March 2015 at 22:18.

  2. #2
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default Re: OPTION_REG.7=0…… Or does it ?

    0 = PORTB pull-ups are enabled by individual port latch values - inputs only get pullups

    BTW OPTION_REG.7=0 Decimal point got lost in post, I will fix in your post, check your code
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  3. #3


    Did you find this post helpful? Yes | No

    Default Re: OPTION_REG.7=0…… Or does it ?

    Selecting a gpio as output automatically disables the weak pull-up. Several peripherals do the same.

    George

  4. #4
    Join Date
    May 2012
    Location
    Merseyside, UK
    Posts
    237


    Did you find this post helpful? Yes | No

    Default Re: OPTION_REG.7=0…… Or does it ?

    Quote Originally Posted by towlerg View Post
    Selecting a gpio as output automatically disables the weak pull-up. Several peripherals do the same.

    George
    Is what I thought….

    Just needed to confirm…. Thank you

    Andy

Similar Threads

  1. 12F683 trailing and rising edges in option_reg
    By AvionicsMaster1 in forum General
    Replies: 5
    Last Post: - 26th May 2011, 14:02
  2. Question about Option_Reg
    By financecatalyst in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 15th November 2009, 21:06
  3. 18f2520 - Option_reg
    By mpardinho in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 14th April 2008, 17:06
  4. OPTION_REG = $7f syntax error
    By ttease in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 10th April 2007, 20:05

Members who have read this thread : 1

You do not have permission to view the list of names.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts