Only bit 7 of OPTION_REG control the weak pullup on portB and only on portB.
When :
OPTION_REG.7 = 0 the weak pullup are set
OPTION_REG.7 = 1 the weak pullup are removed
Naturally the pullup apply only if portB is an input, otherwise if is set as an OUTPUT, you don't need any pullup.
If you need a pulldown situation, on portB, then you set OPTION_REG.7 = 1 and you connect external resistors from pins to ground.
Al.
Bookmarks