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.

What does 1 << ( twint) mean?

Status
Not open for further replies.

dl09

Full Member level 4
Full Member level 4
Joined
Feb 12, 2020
Messages
226
Helped
2
Reputation
4
Reaction score
1
Trophy points
18
Activity points
1,706
If I write 1 << (twint) on an arduino ide, does that set or clear the twi interrupt flag of the twi control register? I tried researching on the internet, I cannot find an answer.
 

If I write 1 << (twint) on an arduino ide,
does that set or clear the twi interrupt flag
of the twi control register? I tried researching on the internet,
I cannot find an answer.

the operation clears bitno_0 of the register.
 

Are you sure?
1 << (twint) shifts a '1' left by '(twint)' times, it creates a value but does it change the contents of a register?

Brian.
 

Are you sure?
1 << (twint) shifts a '1' left by '(twint)' times, it creates a value but does it change the contents of a register?

Brian.

Honestly I don't know what it does.
 

1 << (twint) shifts a '1' left by '(twint)' times, it creates a value but does it change the contents of a register?

You are right; it does nothing because the contents are not assigned a location. I think the result will be left into the accumulator and discarded.

You need an assignment statement: x=1<<2; (or something like that); it can also be part of another expression.
 

Honestly I don't know what it does.

If you don't know, just click on Help -> Reference and, if you are lucky, you will find this page:

file:///home/zasto/arduino-1.8.12/reference/www.arduino.cc/en/Reference/Bitshift.html

Don't be shy to consult Help :D
 

Last edited:

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top