Feb 12, 2013 #1 M mokashiswapnil Newbie level 3 Joined Feb 12, 2013 Messages 4 Helped 0 Reputation 0 Reaction score 0 Trophy points 1,281 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.
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.
Feb 12, 2013 #2 Tahmid Advanced Member level 6 Joined Jun 17, 2008 Messages 4,756 Helped 1,798 Reputation 3,588 Reaction score 1,656 Trophy points 1,413 Location Berkeley, California Activity points 30,586 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.
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.
Feb 13, 2013 #3 M mokashiswapnil Newbie level 3 Joined Feb 12, 2013 Messages 4 Helped 0 Reputation 0 Reaction score 0 Trophy points 1,281 Activity points 1,303 Tahmid said: 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. Click to expand... 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.
Tahmid said: 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. Click to expand... 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.