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.

PIC Mikro c - bit testing

Status
Not open for further replies.

DTSFA

Newbie level 5
Joined
Oct 30, 2012
Messages
10
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,344
hi

I am new to using Mikro C for PICs,

is it possible to bit test port for a '0',

or

is it case of bit testing port for '1', true, and if not, then must be '0' ?
 

It's obviously possible to bit test for 0. Let's say you want to test PORTA0. So, you could do it like this:
Code:
if (PORTA.B0 == 0){
//...........
}
or
Code:
if (RA0_bit == 0){
//...........
}

Hope this helps.
Tahmid.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top