hi frndz,
m new to microcontrollers.me want to build a temperature controller using 89c51 and LM35 as a sensor. i need to show temperature with accuracy of 0.1 degree C. whats the method for making decimal calculations with 89c51.m using assembly language.
thankyou.
You can use Fixed Point Notation. This just uses the same method you use to make decimal numbers fractional.
35.6 in decimal = 3*10^1 + 5*10^0 + 6*10^-1
10.11 in binary = 1*2^1 + 0 *2^0 + 1*2^-1 + 1*2^-2 = 2.75 in decimal
All the integer operations are the same you just have to remember where the decimal point is when you convert to decimal. The algorithim to convert to decimal is the same too you just need to put a decimal point in the right place when you display the number.