Options_reg


Closed Thread
Results 1 to 2 of 2

Thread: Options_reg

  1. #1
    paul.mcallister's Avatar
    paul.mcallister Guest

    Smile Options_reg

    Hi, I am trying to use the OPTIONS_REG directive to turn on PortB pull up resistors for a 16F876 but I can't find reference to it in the PicPro manual.

    Browsing the Pic data sheets sugests that this directive does other things as well.

    Could some one give me the correct syntax for turning on the pull up resistors, and if possible where I can read about it in the PicPro manual

    Thanks, Paul

  2. #2
    Join Date
    Feb 2003
    Location
    Salt Lake City, Utah USA
    Posts
    517


    Did you find this post helpful? Yes | No

    Smile

    See section 2.2.2.2 of the 16F876 data sheet (this is a must read)

    Just add

    OPTION_REG.7 = 0 'turns on weak pull-ups

    or

    OPTION_REG.7 = 1 ' turns off weak pull-ups


    near the top of your code.

    OPTION_REG is one of many Special Function Registers that can be accessed directly. Do not leave home without the PBP manual and the data sheet for your PIC!

    Good Luck,

    Paul Borgmeier
    Salt Lake City, Utah
    USA

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