Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] Pic18f2550 - internal pullup

Status
Not open for further replies.

vixy

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?
 

FvM

Super Moderator
Staff member
Joined
Jan 22, 2008
Messages
50,210
Helped
14,523
Reputation
29,318
Reaction score
13,497
Trophy points
1,393
Location
Bochum, Germany
Activity points
288,303
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

vixy

Newbie level 2
Joined
Jun 27, 2011
Messages
2
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
1,294
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 :)
 

rajib.das

Member level 3
Joined
Oct 23, 2013
Messages
54
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Activity points
415
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

Top