Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

interfacing temperature sensor lm 35 to 8086

Status
Not open for further replies.

subodhhegde

Newbie
Newbie level 3
Joined
May 5, 2013
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Visit site
Activity points
1,302
I am working on interfacing the temperature sensor lm35 to 8086 microprocessor. After getting the 8 bit value from the adc which is stored in Al register has to be manipulated to convert to temperature. If my reference voltage is 5v, can anyone help me in writing the assembly code.... plz..:-o
 

Are you interfacing ADC0804, 0808, 0809 to 8086?

Lets us assume that you have used reference voltage for ADC such that for 5V adc value is 255

now adc value for max voltage of LM35 will be 76.5

max voltage of LM35 is 1.5V

If 76 is stored in AL

and you want to display it as 150 deg C.


temp = 76.5 * 1.96078431372549

approx is

77 * 2

AL is 8 bit and max value is 255

MUL AL, 2

multiplies value in AL with 2 and stores it in AL
 
ok... thanks. i am using adc 0816.....
But my temperature is in hex.
If i take the above mentioned case of 76.5, if i do MUL AL,2, i will have 98 in AL register which is 152 in decimal.
If i want convert from hex to bcd, is there any instruction in 8086 instruction set? OR do i have to write a separate procedure for it?
 
Last edited:

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top