Continue to Site

[SOLVED] Pic18f2550 - internal pullup

Status
Not open for further replies.

vixy

Newbie level 2
Newbie level 2
Joined
Jun 27, 2011
Messages
2
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
1,294
Hello,

I am using mikroC for programming PIC uC. I would like to set internal pullup at pins of PORTB, but I have a problem with instruction OPTION_REG.F7 = 0;.

Returned error: Undeclared identifier 'OPTION_REG' in expression

How can I solve this problem?
 

PORTB pullups are enabled by bit RBPU in INTCON2 register. I can't imagine that it's renamed to "OPTION_REG" in mkroC. Where did you get the idea?
 
  • Like
Reactions: vixy

    vixy

    Points: 2
    Helpful Answer Positive Rating
on the Internet... I think that this instruction is valid, becous it works added manualy in some example projects like PortExpander

---------- Post added at 10:01 ---------- Previous post was at 09:59 ----------

Haha - you're great!

Intcon2.rbpu = 0;

works perfectly - thank you a lot :)
 
can I enable pullup resister in port E or C for p18f452
I cant find anything like those in data sheet
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top