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.

how to print a float value in lcd

Status
Not open for further replies.

skarthikshines

Member level 5
Joined
Feb 21, 2011
Messages
81
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
2,060
hi all am using msp430g2231 and am using code composer studio..
i and am trying to display a adc value to my lcd.. my input voltage is 1.85v for that am getting a digital value like 532..
and i tried to show this digital value and i did that successfully.. now i need to show the float value to my lcd by converting the digital value in to analog by this following calculation


analog value =(532*1023)*3.57 = 1.856
now i need to display that float value to my lcd please suggest me a code for this ?????
 

You can multiply the float to become a decimal and then print it as usual adding a dot character in correct position.
Note that the analogue value is ADCresult*3.57/1023 (for a 10bit ADC) so my suggestion would look like ADCresult*3570/1023 and the result will be in milli volts.

(532*1023)/3.57 = 1856 then you just need to show '1' '.' '8' '5' '6' 'v'

Alex
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top