What does << mean?

Status
Not open for further replies.

Mosaic

Well-Known Member
Code:
MOVF      PORTB,W                  ; Read DQ
             ANDLW     1<<DQ                    ; Mask off the DQ bit

Can anyone explain the andlw 1<<DQ line function please?
 
It means shift left and so, 1<<3 would be 1000 = 8 and 1<<7 = 10000000 = 128.

Mike.
 
ok thx.
so DQ must be a fixed number, not updatable within the code.

Mosaic, Read the comments on the code
; Read DQ (bit)
; mask off the DQ bit

so now do you think DQ is fixed ??????

I'll near bet this is Maxims one wire code

Cheers Bryan
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…