Connect with us

how to set RBPU bit in OPTION register

Discussion in 'Microcontrollers, Programming and IoT' started by milen, Jan 21, 2010.

Scroll to continue with content
  1. milen

    milen

    17
    0
    Dec 20, 2009
    I want to set rbpu bit to be 0 so I will enable portb internal pull ups in PIC mcu.
    I am using mikropascal compiler and when I write "OPTION_REG:=value;" the command is excepted, but if I want to set particular bit as "OPTION_REG.RBPU:=0" the command isn't accepted.

    For comparison the compiler excepts this line OSCCON.IRCF2:=1; where you set oscilator freq bits.
     
  2. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,359
    2,755
    Jan 21, 2010
    option_reg.7 := 0 seems to be the way to go.
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-