UT= MSB << 8 + LSB
MSB is 0xf6 - this can be found on my output of the logic analyzer.. but where is LSB and how what is <<?
Can some give me a quick overview how I can comprehand this? MY goal is to calculate the Temperature with the formular in the datasheet in combination from the logic analyzer data.
That code is most often used when two 8 bit bytes are read (for example from an I2C device). Those two bytes are called LSB (Least significant byte) and MSB (most significant byte). Eachbyte contains half of a 16 bit integer value.
Assuming thaz MSB was binary 0000001 and LSB was binary 00000011.
MSB << 8 would get 0000000100000000, adding in LSB would get a final result of 0000000100000011 which is a 16 bit integer with the value of 256 (from MSB) plus 3 (from LSB) equalling 259.
MSB LSB is a 16 bit binary number sent in two separate operations of 8 bits each
MSB LSB
01001010 10010100
<< is shift a binary number to the left. Being binary each time you shift you essentially multiply by 2 ( for decimal consider 10<<2 = 1000 ) so shifting by 8 is the same a multiplying by 256.