I've got this simple question that i can't crack. I do a readout from a chip that gives med MSB and LSB using SMBus in Python2.7.
I need to remove the 2 first bit in MSB and then combine it with the last 8 bit fron LSB.
Like:
MSB = bus.read_byte_data(address, register_1)
LSB = bus.read_byte_data(address, register_2)
MSB = 11110000 , LSB = 11111111
MSB_cut = 110000 , LSB = 11111111
Combined = 11000011111111
And then convert it to an integer.
I have tried with Bitwise operation but i don't get it right. I know this it quit simple, so is there someone who can show med the right code?
Thanks.