eebhoi01
Advanced Member level 4
Hello,
I am confused with the shifting of bits, please help me clarify my thoughts. If I do this code,
My questions is, by shifting SS, MOSI, SCK to the left by 1 isn't its value will now be
For SS: From 00010000 to 00100000
For MOSI: From 00100000 to 01000000
For SCK: From 10000000 to 00000000
Is this right? If I will apply "OR" with this values isn't it the final value of DDRB is this "01100000"?
If this is right, I believe this is wrong for what is suppose to be the value of DDRB which should be "10110000"
Thank you in advance.
I am confused with the shifting of bits, please help me clarify my thoughts. If I do this code,
My questions is, by shifting SS, MOSI, SCK to the left by 1 isn't its value will now be
For SS: From 00010000 to 00100000
For MOSI: From 00100000 to 01000000
For SCK: From 10000000 to 00000000
Is this right? If I will apply "OR" with this values isn't it the final value of DDRB is this "01100000"?
If this is right, I believe this is wrong for what is suppose to be the value of DDRB which should be "10110000"
Thank you in advance.
Last edited: