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.

Please Help In This One MC89c52

Status
Not open for further replies.

x_x_mot

Newbie level 2
Joined
Mar 12, 2010
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
UK
Activity points
1,297
I have a project to calc temp with LM35 then amplify it with gain (10) then to ADC 0804 supply 5v , then to MC89c52, i need to out the eqv temp on the lcd.

i know every dependante part and how it work , i know how to show any thing on lcd, and how adc and mc works

the problem is i get a hex no from adc (8 bits) and also MC take it as hex no , i need to show a 2 digit to lcd
for example:

temp now is 25 -> 250mV -----(gain 10)---->2.5V-------(adc)-------> 80h = 128d


how to convert THis 80h to 25d

thats all :s the only part stoped with me , please any help on this i will be greatfull :D
 

teodor

Junior Member level 1
Joined
Jul 28, 2007
Messages
15
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,281
Activity points
1,402
Using 8-bit ADC:
Temperature[C] = adc / 5.12
Resolution is 0.1953C.

(adc)-------> 80h = 128d -------> 128d / 5.12 = 25 Centigrade
 

x_x_mot

Newbie level 2
Joined
Mar 12, 2010
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
UK
Activity points
1,297
thx dude

but the problem is not here , the problem is showing this 25 C in lcd , lcd only understand ascii (8 bit) , but the treatment in MC is hex and 8 bit only but 25°C is 2 digits , i need conversion in the Mc from 80 >>>>>> 25 :D i hope i could exmplain
√√√√√√√:idea:

Added after 57 minutes:

This Table show what i need , but i didnt understand it , it comes at the STEP 10 ( add 3 after the Shift 7) and messed up


any one can tell me
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top