triton99
- 29th November 2011, 13:46
Could someone explain the */ operator to me. Im using the MAX6675 for a determining the temperature. The temperature is stored as a 12bit value. The example found here (http://www.emesystems.com/OL2therm.htm#MAX667x_program) uses:
shiftin thdata,thclk,0,[result\16] ' get data from MAX6675
TempC=result>>3*/640 ' for MAX6675 +/- 0.1 degC, up to 1023.7
TempC is a WORD variable.
Then when the program displays the temperature it first divides by 10. ie.
debug dec THC/10,".",dec1 TempC
What effect does the */ have on the result variable? How does "Middle 16bit Multiplication" work?
Thanks
shiftin thdata,thclk,0,[result\16] ' get data from MAX6675
TempC=result>>3*/640 ' for MAX6675 +/- 0.1 degC, up to 1023.7
TempC is a WORD variable.
Then when the program displays the temperature it first divides by 10. ie.
debug dec THC/10,".",dec1 TempC
What effect does the */ have on the result variable? How does "Middle 16bit Multiplication" work?
Thanks