Are you comparing the temp sensor output data to the value "78" or "780"? If I understand the data format of the temp sensor read code, the data is (temperature * 10) so that you have a resolution of 0.1 deg. Which means 78.0 degrees is 780 decimal returned by the temp sensor read code.
Also in your compare code you are right shifting the temp sensor reading by 4 which is like dividing by 16. This changes the decimal value 780 to 48 which is not what I think you wanted to do. You need to actually divide the temp sensor data by 10 decimal, and then compare. Or multiply the test value by 10 and then compare.
I think what is confusing you is the DEC function. The DEC take a value and returns the specified decimal digit. Kind of like this: [value / (10 ^ n) ] // 10.
Bookmarks