DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   Assembly (http://www.daniweb.com/forums/forum125.html)
-   -   Temperauture Conversion (http://www.daniweb.com/forums/thread25921.html)

jfountain02 Jun 16th, 2005 9:01 am
Temperauture Conversion
 
Hello, I just created a digital thermometer using a 8085 microprocessor. But the problem is we only had LM36 which measures temperauture in celsius, so we had to convert form celsius to farenheit, using hardware. But on a lab question the teacher wants us to convert the tempauture using software and not hardware, but I have no clue as how to do this in software, can somebdoy point me in the right direction to do this. Thanks in advance.

JoetjeF Jun 16th, 2005 11:51 am
Re: Temperauture Conversion
 
The formula itself is quite simple:

F = (9/5)*C+32

Not sure if you want to do this in 8085 assembly?

jfountain02 Jun 16th, 2005 2:57 pm
Re: Temperauture Conversion
 
Yeah, I already knew what the formula was, I just can't figure out on how to do it on a 8085 microprocessor.

ebtehal Dec 4th, 2006 4:36 am
Re: Temperauture Conversion................
 
Quote:

Originally Posted by jfountain02 (Post 131394)
Hello, I just created a digital thermometer using a 8085 microprocessor. But the problem is we only had LM36 which measures temperauture in celsius, so we had to convert form celsius to farenheit, using hardware. But on a lab question the teacher wants us to convert the tempauture using software and not hardware, but I have no clue as how to do this in software, can somebdoy point me in the right direction to do this. Thanks in advance.

...........................:-| ;)

mathematician Dec 4th, 2006 7:44 pm
Re: Temperauture Conversion
 
Quote:

Originally Posted by jfountain02 (Post 131538)
Yeah, I already knew what the formula was, I just can't figure out on how to do it on a 8085 microprocessor.


If 8085 is anything like 8086 it goes:

xor ah,ah
mov al, celcius
mov bh, 9
mul bh
mov bh, 5
div bh
add al, 32
mov farenheit, al


All times are GMT -4. The time now is 3:48 am.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC