Continue to Site

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.

Pull up RB1 on pic18f2520

Status
Not open for further replies.

kle0ps

Junior Member level 2
Joined
Nov 12, 2012
Messages
24
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,426
Hello guys.
Does anyone know how to pull up only RB1 on PIC18F2520?
I use C18 compiler
Thank you
 

Hello mate
I know that, but i want to connect my pic18f2520 with arduino. i want to sent HIGH (3-5V) from RB1 to arduino only when I want, not continuously
 

Then write the code to make pin RB1 high or low according to your need.

I set PORTB as ouputs and i set PORTBbits.RB0==1; (HIGH) but when i measure the voltage on RB0 was zero

- - - Updated - - -

Finally i fix it. I change PORTBbits.RB0==1 to PORTA=0b00000001;
Thank you mate!
 

When you want to write to a bit or a register, you use only = , not ==.

Like you used
Code:
PORTBbits.RB0 = 1;

If you want to check/compare, then you use == instead of =.

Code:
if (PORTBbits.RB0 ==1){

}
if (PORTD == 255){

}

Hope this helps.
Tahmid.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top