Look in the include file for the definitions of constants like this. On 3/7/07, Mauricio Jancic wrote: > > Yes, I knew it was a bit shift, but I didn't understand de PB1 and why was > shifting PB1 1 time to the left (here you can see my mistake)... > > The thing is PB1 is a constant indicating pin number, and it was shifting > the 1 PB1 times to the left and then ANDing it to PINB. > > Just a missreading > > THANKS!! > > Mauricio > > > > > -----Original Message----- > > From: piclist-bounces@mit.edu > > [mailto:piclist-bounces@mit.edu] On Behalf Of David VanHorn > > Sent: Tuesday, March 06, 2007 20:43 > > To: Microcontroller discussion list - Public. > > Subject: Re: [PIC] Quick C question > > > > On 3/6/07, Mauricio Jancic wrote: > > > > > > Hi, > > > I modifying a C code for an ATMEL chip, and I found > > this statement: > > > > > > if(!(PINB & (1< > > > > > Whats that? Specially the (1< > to figure > > > out... > > > > > > That's a bit shift, a common way to address individual pins. > > They are masking the read of PINB against a byte with the PB1 bit set. > > So, the statement is conditional on gettting a zero on the > > PB1 bit of PINB. > > -- > > http://www.piclist.com PIC/SX FAQ & list archive View/change > > your membership options at > > http://mailman.mit.edu/mailman/listinfo/piclist > > > > > > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist