How to Display 49.80 in LCD as answer in an Equation pic16f877a

Status
Not open for further replies.

RannieKnows

Junior Member level 1
Joined
Sep 9, 2014
Messages
15
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
107
Inputting an equation 127*100/255 produces an LCD output of 49 instead of 49.80

How to have whole number with decimal point value in my answer?
PLEASE HELP ME. THANKS.
 

Mikrobasic is also responsible for its compilation, right? (Help me please. Thanks)
 

You have to use float or double type variables and use FloatToStr() function. I have answered to a similar question in your another thread.

I have fixed the code as you need. I have tested in Proteus 8.1 Simulator.

 

Attachments

  • Temperature rev1.rar
    114.4 KB · Views: 100
  • sim.png
    35.3 KB · Views: 111
Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…