Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
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.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.