Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

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.

Latest threads

New Articles From Microcontroller Tips

Back
Top