math calculation doens not worked in mikroc pic

Status
Not open for further replies.

mokashiswapnil

Newbie level 3
Joined
Feb 12, 2013
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Visit site
Activity points
1,303
Hi ,this is my mikroc code.I am not getting temp value on lcd .
float y,rtdr,temp;
char opr[30];
y = 0.15274- (rtdr-100.0)*2310.0e-7;
if(y>= 0)
y= sqrt;
temp = (y-0.39083)/(-0.0001155) ;

FloatToStr(temp,opr);
Lcd_Out(1,1,lcd);


i am not getting value of y also value of temp.
 

Code:
float y,rtdr,temp;
char opr[30];
y = 0.15274- (rtdr-100.0)*2310.0e-7;
if(y>= 0)
y= sqrt(y);
temp = (y-0.39083)/(-0.0001155) ;

FloatToStr(temp,opr);
Lcd_Out(1,1,lcd);

Code:
[B]Lcd_Out(1,1,[U][COLOR="#FF0000"]lcd[/COLOR][/U]);[/B]

Where did you get this "lcd" variable?

Code:
FloatToStr(temp,[COLOR="#FF0000"][B][U]opr[/U][/B][/COLOR]);

You should use this "opr" variable, which is where your result from the float to string conversion is stored.

Hope this helps.
Tahmid.
 


Thank you Tahmid,i corrected my code with Lcd_Out(1,1,opr),but i get blank lcd and no pic microcontroller operation simulating on proteus.
 

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…